Skip to content

Commit bf2684d

Browse files
authored
Merge pull request #167 from tnevrlka/azure-gitops-template
Add Azure gitops pipeline
2 parents 6fe3c26 + f8b9a9d commit bf2684d

File tree

5 files changed

+67
-6
lines changed

5 files changed

+67
-6
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ FILES=\
1111
generated/gitops-template/jenkins/Jenkinsfile \
1212
generated/gitops-template/githubactions/.github/workflows/gitops-promotion.yml \
1313
generated/gitops-template/gitlabci/.gitlab-ci.yml \
14+
generated/gitops-template/azure/azure-pipelines.yml \
1415
\
1516
rhtap.groovy \
1617
rhtap/build-pipeline-steps.sh \
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Generated from templates/gitops-template/azure-pipelines.yml.njk. Do not edit directly.
2+
3+
trigger:
4+
- main
5+
6+
pool:
7+
name: resourcehub
8+
9+
container:
10+
image: quay.io/redhat-appstudio/rhtap-task-runner:latest
11+
options: --privileged
12+
13+
steps:
14+
- bash: |
15+
echo "• gather-deploy-images"
16+
bash /work/rhtap/gather-deploy-images.sh
17+
echo "• verify-enterprise-contract"
18+
bash /work/rhtap/verify-enterprise-contract.sh
19+
name: Verify_EC
20+
env:
21+
TRUSTIFICATION_OIDC_CLIENT_SECRET: $(TRUSTIFICATION_OIDC_CLIENT_SECRET)
22+
# Set this password for your specific registry
23+
# IMAGE_REGISTRY_PASSWORD: $(IMAGE_REGISTRY_PASSWORD)
24+
# QUAY_IO_CREDS_PSW: $(QUAY_IO_CREDS_PSW)
25+
# ARTIFACTORY_IO_CREDS_PSW: $(ARTIFACTORY_IO_CREDS_PSW)
26+
# NEXUS_IO_CREDS_PSW: $(NEXUS_IO_CREDS_PSW)
27+
- bash: |
28+
echo "• gather-images-to-upload-sbom"
29+
bash /work/rhtap/gather-images-to-upload-sbom.sh
30+
echo "• download-sbom-from-url-in-attestation"
31+
bash /work/rhtap/download-sbom-from-url-in-attestation.sh
32+
echo "• upload-sbom-to-trustification"
33+
bash /work/rhtap/upload-sbom-to-trustification.sh
34+
name: Upload_SBOM
35+
env:
36+
TRUSTIFICATION_OIDC_CLIENT_SECRET: $(TRUSTIFICATION_OIDC_CLIENT_SECRET)
37+
# Set this password for your specific registry
38+
# IMAGE_REGISTRY_PASSWORD: $(IMAGE_REGISTRY_PASSWORD)
39+
# QUAY_IO_CREDS_PSW: $(QUAY_IO_CREDS_PSW)
40+
# ARTIFACTORY_IO_CREDS_PSW: $(ARTIFACTORY_IO_CREDS_PSW)
41+
# NEXUS_IO_CREDS_PSW: $(NEXUS_IO_CREDS_PSW)

generated/source-repo/azure/azure-pipelines.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ steps:
1414
- bash: |
1515
echo "• init"
1616
bash /work/rhtap/init.sh
17-
name: Init
17+
name: init
1818
env:
1919
ROX_API_TOKEN: $(ROX_API_TOKEN)
2020
GITOPS_AUTH_PASSWORD: $(GITOPS_AUTH_PASSWORD)
@@ -30,7 +30,7 @@ steps:
3030
bash /work/rhtap/buildah-rhtap.sh
3131
echo "• cosign-sign-attest"
3232
bash /work/rhtap/cosign-sign-attest.sh
33-
name: Build
33+
name: build
3434
env:
3535
ROX_API_TOKEN: $(ROX_API_TOKEN)
3636
GITOPS_AUTH_PASSWORD: $(GITOPS_AUTH_PASSWORD)
@@ -44,7 +44,7 @@ steps:
4444
- bash: |
4545
echo "• update-deployment"
4646
bash /work/rhtap/update-deployment.sh
47-
name: Deploy
47+
name: deploy
4848
env:
4949
ROX_API_TOKEN: $(ROX_API_TOKEN)
5050
GITOPS_AUTH_PASSWORD: $(GITOPS_AUTH_PASSWORD)
@@ -62,7 +62,7 @@ steps:
6262
bash /work/rhtap/acs-image-check.sh
6363
echo "• acs-image-scan"
6464
bash /work/rhtap/acs-image-scan.sh
65-
name: Scan
65+
name: scan
6666
env:
6767
ROX_API_TOKEN: $(ROX_API_TOKEN)
6868
GITOPS_AUTH_PASSWORD: $(GITOPS_AUTH_PASSWORD)
@@ -78,7 +78,7 @@ steps:
7878
bash /work/rhtap/show-sbom-rhdh.sh
7979
echo "• summary"
8080
bash /work/rhtap/summary.sh
81-
name: Summary
81+
name: summary
8282
env:
8383
ROX_API_TOKEN: $(ROX_API_TOKEN)
8484
GITOPS_AUTH_PASSWORD: $(GITOPS_AUTH_PASSWORD)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{%- include "do-not-edit.njk" -%}
2+
{%- set secrets = gitops_secrets -%}
3+
4+
trigger:
5+
- main
6+
7+
pool:
8+
name: resourcehub
9+
10+
container:
11+
image: quay.io/redhat-appstudio/rhtap-task-runner:latest
12+
options: --privileged
13+
14+
steps:
15+
{%- filter indent(2) -%}
16+
{%- for step in gitops_steps %}
17+
{% include "azure-step.njk" %}
18+
{%- endfor -%}
19+
{%- endfilter -%}

templates/partials/azure-step.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
echo "• {{ substep }}"
55
bash /work/rhtap/{{ substep }}.sh
66
{%- endfor %}
7-
name: {{ step.name | title }}
7+
name: {{ step.name | replace(" ", "_") }}
88
env:
99
{%- filter indent(2) -%}
1010
{%- for secret in secrets %}

0 commit comments

Comments
 (0)