Skip to content

Commit c3dbbc0

Browse files
authored
Merge pull request #546 from WASdev/script-consolidation2
Further build script consolidation
2 parents 88880f7 + 7df9349 commit c3dbbc0

File tree

1 file changed

+9
-40
lines changed

1 file changed

+9
-40
lines changed

.one-pipeline.yaml

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ detect-secrets:
2020
skip: true
2121
script: |
2222
#!/usr/bin/env bash
23+
echo $STAGE
24+
2325
echo "Skipping detect-secrets as it's already run as part of code-compliance-checks"
2426
exit 0
2527
@@ -69,11 +71,7 @@ compliance-checks:
6971
#!/usr/bin/env bash
7072
echo $STAGE
7173
72-
source ./scripts/pipeline/common-functions.sh
73-
check_periodic_scan_env
74-
check_skip_scans_env
75-
76-
"${COMMONS_PATH}"/compliance-checks/run.sh
74+
./scripts/pipeline/compliance-checks-stage.sh
7775
7876
containerize:
7977
dind: true
@@ -95,51 +93,32 @@ sign-artifact:
9593
#!/usr/bin/env bash
9694
echo $STAGE
9795
98-
source ./scripts/pipeline/common-functions.sh
99-
check_periodic_scan_env
100-
check_skip_scans_env
101-
check_release_acceptance_test_env
96+
./scripts/pipeline/sign-artifact-stage.sh
10297
10398
deploy:
10499
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:3.12
105100
script: |
106101
#!/usr/bin/env bash
107102
echo $STAGE
108-
109-
source ./scripts/pipeline/common-functions.sh
110-
check_periodic_scan_env
111-
112-
if [[ "$PIPELINE_DEBUG" == 1 ]]; then
113-
trap env EXIT
114-
env
115-
set -x
116-
fi
103+
104+
echo "Skipping deploy as it's already run as part of acceptance-test"
105+
exit 0
117106
118107
dynamic-scan:
119108
abort_on_failure: false
120109
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:3.12
121110
script: |
122111
#!/usr/bin/env bash
123-
124112
echo $STAGE
125113
126-
source ./scripts/pipeline/common-functions.sh
127-
check_periodic_scan_env
128-
check_skip_scans_env
129-
check_release_acceptance_test_env
130-
131-
#export APP_URL=$(cat ../app-url)
132-
# feature preview this until evidence locker v2 usage is full feature ready
133-
# can be triggered, and owasp will run for preview purposes
134-
#source scripts/zap/trigger_api_scan.sh
114+
./scripts/pipeline/dynamic-scan-stage.sh
135115
136116
acceptance-test:
137117
dind: true
138118
abort_on_failure: true
139119
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:3.12
140120
script: |
141121
#!/usr/bin/env bash
142-
143122
echo $STAGE
144123
145124
PERIODIC_SCAN=$(get_env periodic-rescan)
@@ -183,12 +162,7 @@ scan-artifact:
183162
#!/usr/bin/env bash
184163
echo $STAGE
185164
186-
source ./scripts/pipeline/common-functions.sh
187-
check_skip_scans_env
188-
check_release_acceptance_test_env
189-
190-
# ========== Security Scanner ==========
191-
./scripts/pipeline/scan-artifact.sh
165+
./scripts/pipeline/scan-artifact-stage.sh
192166
193167
release:
194168
abort_on_failure: false
@@ -197,9 +171,4 @@ release:
197171
#!/usr/bin/env bash
198172
echo $STAGE
199173
200-
source ./scripts/pipeline/common-functions.sh
201-
check_periodic_scan_env
202-
check_skip_scans_env
203-
check_release_acceptance_test_env
204-
205174
./scripts/pipeline/release-stage.sh

0 commit comments

Comments
 (0)