3030 steps :
3131 - name : Verify Veracode API credentials
3232 id : verify_api_creds
33- uses :
veracode/[email protected] .7 33+ uses :
veracode/[email protected] .8 3434 with :
3535 action : validateVeracodeApiCreds
3636 token : ${{ github.event.client_payload.token }}
4343 - name : Verify Policy name
4444 id : verify_policy_name
4545 if : success()
46- uses :
veracode/[email protected] .7 46+ uses :
veracode/[email protected] .8 4747 with :
4848 action : validatePolicyName
4949 token : ${{ github.event.client_payload.token }}
@@ -119,7 +119,7 @@ jobs:
119119 - name : Veracode Pipeline-Scan
120120 if : always()
121121 id : pipeline-scan
122- uses :
veracode/[email protected] .18 122+ uses :
veracode/[email protected] .19 123123 with :
124124 vid : ${{ secrets.VERACODE_API_ID }}
125125 vkey : ${{ secrets.VERACODE_API_KEY }}
@@ -133,11 +133,12 @@ jobs:
133133 filtered_json_output_file : ${{ strategy.job-index }}-filtered_results.json
134134 artifact_name : ${{ matrix.file }}
135135 debug : 1
136+ workflow_app : true
136137
137138 - name : Veracode Pipeline Results
138139 if : always()
139140 id : prepare-results
140- uses :
veracode/[email protected] .7 141+ uses :
veracode/[email protected] .8 141142 with :
142143 action : ' preparePipelineResults'
143144 token : ${{ github.event.client_payload.token }}
@@ -178,23 +179,33 @@ jobs:
178179 needs : pipeline_scan
179180 if : always()
180181 steps :
181- - name : Update cxheck
182- id : update_check_status
183- shell : bash
184- run : |
185- # Convert JSON string to a proper format for jq processing
186- echo '${{ toJSON(needs) }}' | jq -c 'to_entries[]' | while read -r job; do
187- status=$(echo "$job" | jq -r '.value.result')
188- if [ "$status" = "success" ]; then
189- echo "Job scuccess no need to update"
190- success_count=$((success_count + 1))
191- elif [ "$status" = "failure" ]; then
192- echo "Jobs failed - need checks update"
193- echo '{"status": "completed", "conclusion": "failure"}' > payload.txt
182+ - name : Update check
183+ id : update_check_status
184+ shell : bash
185+ env :
186+ BREAK_BUILD_ON_ERROR : ${{ github.event.client_payload.user_config.break_build_on_error }}
187+ BREAK_BUILD_ON_POLICY : ${{ github.event.client_payload.user_config.break_build_policy_findings }}
188+ run : |
189+ success_count=0
190+ conclusion="failure"
191+ # Convert JSON string to a proper format for jq processing
192+ echo '${{ toJSON(needs) }}' | jq -c 'to_entries[]' | while read -r job; do
193+ status=$(echo "$job" | jq -r '.value.result')
194+ echo "$status"
195+ if [ "$status" = "success" ]; then
196+ success_count=$((success_count + 1))
197+ echo '{"status": "completed", "conclusion": "success"}' > payload.txt
198+ elif [ "$status" = "failure" ]; then
199+ if [ "$BREAK_BUILD_ON_ERROR" = "false" && "$BREAK_BUILD_ON_POLICY" = "false" ]; then
200+ echo '{"status": "completed", "conclusion": "success"}' > payload.txt
201+ else
202+ echo '{"status": "completed", "conclusion": "failure"}' > payload.txt
203+ fi
204+ fi
194205 curl -X PATCH \
195206 -H "Authorization: Bearer ${{ github.event.client_payload.token }}" \
196207 -H "Accept: application/vnd.github+json" \
197208 https://api.github.com/repos/${{ github.event.client_payload.repository.owner }}/${{ github.event.client_payload.repository.name }}/check-runs/${{ needs.register.outputs.run_id }} \
198209 -d @"payload.txt"
199- fi
200- done
210+ done
211+
0 commit comments