File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,28 @@ tag_release:
7575 only :
7676 - tags
7777
78+ tag_prod_chart :
79+ stage : tag
80+ extends : .tag_image
81+ # Helm charts live in Harbor as OCI artifacts; add/update a "prod" tag so we
82+ # can easily find the chart version that is currently deployed in production.
83+ variables :
84+ HARBOR_PROJECT : " tulibraries"
85+ HARBOR_CHART_REPOSITORY : " charts%2Fpadigital"
86+ only :
87+ - tags
88+ script :
89+ - |
90+ API_BASE="https://${HARBOR}/api/v2.0/projects/${HARBOR_PROJECT}/repositories/${HARBOR_CHART_REPOSITORY}"
91+ curl --silent --show-error -u "${HARBOR_USERNAME}:${HARBOR_TOKEN}" \
92+ -X DELETE "${API_BASE}/artifacts/prod/tags/prod" || echo "prod tag not present yet"
93+ - |
94+ curl --silent --show-error --fail \
95+ -u "${HARBOR_USERNAME}:${HARBOR_TOKEN}" \
96+ -H "Content-Type: application/json" \
97+ -d "{\"name\":\"prod\"}" \
98+ -X POST "${API_BASE}/artifacts/${HELM_VERSION_PROD}/tags"
99+
78100prod_deploy :
79101 variables :
80102 IMAGE : harbor.k8s.temple.edu/tulibraries/padigital
You can’t perform that action at this time.
0 commit comments