add reason to fialure message
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline was successful
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	ci/woodpecker/push/woodpecker Pipeline was successful
				
			This commit is contained in:
		@@ -89,7 +89,7 @@ pipeline:
 | 
			
		||||
    commands:
 | 
			
		||||
      - sleep 60
 | 
			
		||||
      - shoutrrr send 
 | 
			
		||||
        --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM}
 | 
			
		||||
        --url matrix://:$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM}
 | 
			
		||||
        --message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has completed and been deployed."
 | 
			
		||||
    when:
 | 
			
		||||
      status: 
 | 
			
		||||
@@ -104,10 +104,11 @@ pipeline:
 | 
			
		||||
      - source: MATRIX_ACCESS_TOKEN
 | 
			
		||||
        target: MATRIX_ACCESS_TOKEN
 | 
			
		||||
    commands:
 | 
			
		||||
      - sleep 60
 | 
			
		||||
      - REASON='Reason:'
 | 
			
		||||
      - REASON=$REASON$(cat /git/pipeline/reason)
 | 
			
		||||
      - shoutrrr send 
 | 
			
		||||
        --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM}
 | 
			
		||||
        --message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has failed."
 | 
			
		||||
        --url matrix://:$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM}
 | 
			
		||||
        --message "New image build of $${ORGANIZATION}/$${REPO}, $${TAG}, has failed. $${REASON}"
 | 
			
		||||
    when:
 | 
			
		||||
      status:
 | 
			
		||||
        - failure
 | 
			
		||||
@@ -1,11 +1,13 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
if [[ $TAG =~ ^v1\...\..rc.$ ]]; then
 | 
			
		||||
  echo "Tag ${TAG} appears to be a release candidate, terminating build."
 | 
			
		||||
  echo " Tag is an RC." > /git/pipeline/reason
 | 
			
		||||
  exit 1
 | 
			
		||||
elif [[ $TAG =~ ^v1\...\..$ ]]; then
 | 
			
		||||
  echo "Tag ${TAG} appears to be a release tag, proceeding."
 | 
			
		||||
  exit 0
 | 
			
		||||
else
 | 
			
		||||
  echo "Unable to determine nature of tag, terminating build."
 | 
			
		||||
  echo " Cannot parse tag." > /git/pipeline/reason
 | 
			
		||||
  exit 1
 | 
			
		||||
fi
 | 
			
		||||
		Reference in New Issue
	
	Block a user