Skip to content

Commit 68dd806

Browse files
committed
Clean Up Jobs Added
1 parent 1f8011a commit 68dd806

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

.github/workflows/veracode-pipeline-scan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ jobs:
195195
done
196196
197197
- name: Cleanup workspace and Docker
198+
if: always()
198199
run: |
199200
echo "Running final cleanup..."
200201
sudo rm -rf $GITHUB_WORKSPACE/

.github/workflows/veracode-remove-sandbox.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ jobs:
4141
vkey: ${{ secrets.VERACODE_API_KEY }}
4242
appname: ${{ github.event.client_payload.user_config.profile_name }}
4343
sandboxname: GitHub App Scans-${{ github.event.client_payload.repository.branch }}
44-
44+
45+
cleanup:
46+
runs-on: ${{ fromJSON(github.event.client_payload.user_config.default_runs_on) }}
47+
if: always()
48+
needs: [create-checks-run, veracode-remove-sandbox]
49+
steps:
4550
- name: Cleanup workspace and Docker
4651
run: |
4752
echo "Running final cleanup..."

.github/workflows/veracode-sandbox-scan.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ jobs:
6868
gitRepositoryUrl: ${{ github.server_url }}/${{ github.event.client_payload.repository.full_name }}
6969
deleteincompletescan: true
7070

71-
- name: cleanup job
71+
cleanup:
72+
runs-on: ${{ fromJson(github.event.client_payload.user_config.default_runs_on) }}
73+
if: always()
74+
steps:
75+
- name: Cleanup workspace and Docker
7276
if: always()
7377
run: |
74-
echo "Running cleanup..."
78+
echo "Running final cleanup..."
7579
sudo rm -rf $GITHUB_WORKSPACE/

.github/workflows/veracode-sca-scan.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ jobs:
8989
recursive: true
9090
allow-dirty: true
9191

92+
cleanup:
93+
runs-on: ${{ fromJson(github.event.client_payload.user_config.default_runs_on) }}
94+
if: always()
95+
needs: [register, veracode-sca-scan]
96+
steps:
9297
- name: Cleanup workspace and Docker
98+
if: always()
9399
run: |
94100
echo "Running final cleanup..."
95-
sudo rm -rf $GITHUB_WORKSPACE/
101+
sudo rm -rf $GITHUB_WORKSPACE/

0 commit comments

Comments
 (0)