|
42 | 42 | description: Push scanned images that have vulnerabilities? |
43 | 43 | type: boolean |
44 | 44 | required: false |
45 | | - # NOTE(Alex-Welsh): This default should be flipped once we resolve existing failures |
46 | | - default: true |
| 45 | + default: false |
47 | 46 |
|
48 | 47 | env: |
49 | 48 | ANSIBLE_FORCE_COLOR: True |
@@ -181,7 +180,7 @@ jobs: |
181 | 180 | KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }} |
182 | 181 |
|
183 | 182 | - name: Create build logs output directory |
184 | | - run: mkdir image-build-logs |
| 183 | + run: mkdir image-build-logs |
185 | 184 |
|
186 | 185 | - name: Build kolla overcloud images |
187 | 186 | id: build_overcloud_images |
@@ -254,7 +253,7 @@ jobs: |
254 | 253 |
|
255 | 254 | while read -r image; do |
256 | 255 | # Retries! |
257 | | - for i in {1..5}; do |
| 256 | + for i in {1..5}; do |
258 | 257 | if docker push $image; then |
259 | 258 | echo "Pushed $image" |
260 | 259 | break |
@@ -288,8 +287,15 @@ jobs: |
288 | 287 | run: if [ $(wc -l < image-build-logs/push-failed-images.txt) -gt 0 ]; then cat image-build-logs/push-failed-images.txt && exit 1; fi |
289 | 288 | if: ${{ !cancelled() }} |
290 | 289 |
|
291 | | - - name: Fail when images failed scanning |
292 | | - run: if [ $(wc -l < image-build-logs/dirty-images.txt) -gt 0 ]; then cat image-build-logs/dirty-images.txt && exit 1; fi |
| 290 | + # NOTE(seunghun1ee): Currently we want to mark the job fail only when critical CVEs are detected. |
| 291 | + # This can be used again instead of "Fail when critical vulnerabilities are found" when it's |
| 292 | + # decided to fail the job on detecting high CVEs as well. |
| 293 | + # - name: Fail when images failed scanning |
| 294 | + # run: if [ $(wc -l < image-build-logs/image-scan-output/dirty-images.txt) -gt 0 ]; then cat image-build-logs/image-scan-output/dirty-images.txt && exit 1; fi |
| 295 | + # if: ${{ !inputs.push-dirty && !cancelled() }} |
| 296 | + |
| 297 | + - name: Fail when critical vulnerabilities are found |
| 298 | + run: if [ $(wc -l < image-build-logs/image-scan-output/critical-images.txt) -gt 0 ]; then cat image-build-logs/image-scan-output/critical-images.txt && exit 1; fi |
293 | 299 | if: ${{ !inputs.push-dirty && !cancelled() }} |
294 | 300 |
|
295 | 301 | # NOTE(mgoddard): Trigger another CI workflow in the |
|
0 commit comments