Skip to content

Commit 5f7031c

Browse files
committed
fix: run update-deployment before acs-deploy-check
'acs-deploy-check' checks out the gitops repository to validate the deployment, but that repository was updated after the check.
1 parent 586bf36 commit 5f7031c

File tree

7 files changed

+33
-33
lines changed

7 files changed

+33
-33
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This repository contains the innerloop development environment for the Multi-CI translations from the RHTAP Pipelines. This repository can also be directly tested in the CI system as it includes a copy of a sample source app for RHTAP (node.js) as well as a gitops repo for that deployment. This may be moved to a separate repo in future dev mode builds.
55

66

7-
This repo includes Jenkins, Gitlab and Github Actions tests of the scripts
7+
This repo includes Jenkins, Gitlab and Github Actions tests of the scripts
88

99
The tasks appear in the `rhtap` directory and are updated manually. Once updated they can be tested locally in the shell or pushed to the appropriate CI system and tested in that CI.
1010

generated/source-repo/githubactions/.github/workflows/build-and-update-gitops.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ jobs:
132132
bash /work/rhtap/buildah-rhtap.sh
133133
echo "• cosign-sign-attest"
134134
bash /work/rhtap/cosign-sign-attest.sh
135+
- name: Deploy
136+
run: |
137+
echo "• update-deployment"
138+
bash /work/rhtap/update-deployment.sh
135139
- name: Scan
136140
run: |
137141
echo "• acs-deploy-check"
@@ -140,10 +144,6 @@ jobs:
140144
bash /work/rhtap/acs-image-check.sh
141145
echo "• acs-image-scan"
142146
bash /work/rhtap/acs-image-scan.sh
143-
- name: Deploy
144-
run: |
145-
echo "• update-deployment"
146-
bash /work/rhtap/update-deployment.sh
147147
- name: Summary
148148
run: |
149149
echo "• show-sbom-rhdh"

generated/source-repo/gitlabci/.gitlab-ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ variables:
88
stages:
99
- init
1010
- build
11-
- scan
1211
- deploy
12+
- scan
1313
- summary
1414

1515
init:
@@ -40,6 +40,17 @@ cosign-sign-attest:
4040
paths:
4141
- results/
4242

43+
update-deployment:
44+
stage: deploy
45+
script:
46+
- echo "• update-deployment"
47+
- bash /work/rhtap/update-deployment.sh
48+
artifacts:
49+
paths:
50+
- results/
51+
rules:
52+
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
53+
4354
acs-deploy-check:
4455
stage: scan
4556
script:
@@ -67,17 +78,6 @@ acs-image-scan:
6778
paths:
6879
- results/
6980

70-
update-deployment:
71-
stage: deploy
72-
script:
73-
- echo "• update-deployment"
74-
- bash /work/rhtap/update-deployment.sh
75-
artifacts:
76-
paths:
77-
- results/
78-
rules:
79-
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
80-
8181
show-sbom-rhdh:
8282
stage: summary
8383
script:

generated/source-repo/jenkins/Jenkinsfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ pipeline {
4949
}
5050
}
5151

52+
stage('deploy') {
53+
steps {
54+
script {
55+
rhtap.info('update_deployment')
56+
rhtap.update_deployment()
57+
}
58+
}
59+
}
60+
5261
stage('scan') {
5362
steps {
5463
script {
@@ -62,15 +71,6 @@ pipeline {
6271
}
6372
}
6473

65-
stage('deploy') {
66-
steps {
67-
script {
68-
rhtap.info('update_deployment')
69-
rhtap.update_deployment()
70-
}
71-
}
72-
}
73-
7474
stage('summary') {
7575
steps {
7676
script {

rhtap.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def cosign_sign_attest( ) {
4747
run_script ('cosign-sign-attest.sh')
4848
}
4949

50+
def update_deployment( ) {
51+
run_script ('update-deployment.sh')
52+
}
53+
5054
def acs_deploy_check( ) {
5155
run_script ('acs-deploy-check.sh')
5256
}
@@ -59,10 +63,6 @@ def acs_image_scan( ) {
5963
run_script ('acs-image-scan.sh')
6064
}
6165

62-
def update_deployment( ) {
63-
run_script ('update-deployment.sh')
64-
}
65-
6666
def show_sbom_rhdh( ) {
6767
run_script ('show-sbom-rhdh.sh')
6868
}

rhtap/build-pipeline-steps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
run rhtap/init.sh
44
run rhtap/buildah-rhtap.sh
55
run rhtap/cosign-sign-attest.sh
6+
run rhtap/update-deployment.sh
67
run rhtap/acs-deploy-check.sh
78
run rhtap/acs-image-check.sh
89
run rhtap/acs-image-scan.sh
9-
run rhtap/update-deployment.sh
1010
run rhtap/show-sbom-rhdh.sh
1111
run rhtap/summary.sh

templates/data.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ build_steps:
44
substeps: [init]
55
- name: build
66
substeps: [buildah-rhtap, cosign-sign-attest]
7+
- name: deploy
8+
substeps: [update-deployment]
79
- name: scan
810
substeps: [acs-deploy-check, acs-image-check, acs-image-scan]
911
concurrent: true
10-
- name: deploy
11-
substeps: [update-deployment]
1212
- name: summary
1313
substeps: [show-sbom-rhdh, summary]
1414
concurrent: true

0 commit comments

Comments
 (0)