Skip to content

Commit f541d53

Browse files
authored
ci: update productionstack in nightly ACR chart (#2215)
**Reason for Change**: <!-- What does this PR improve or fix in KAITO? Why is it needed? --> **Requirements** - [ ] added unit tests and e2e tests (if applicable). **Issue Fixed**: <!-- If this PR fixes GitHub issue 4321, add "Fixes #4321" to the next line. --> **Notes for Reviewers**: Signed-off-by: Qinghui Zhuang <qzhuang@microsoft.com>
1 parent 4e2f77a commit f541d53

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/publish-controller-acr-nightly-images.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,30 @@ jobs:
106106
REGISTRY: ${{ secrets.KAITO_ACR_REGISTRY }}
107107
IMG_TAG: ${{ steps.get-image-tag.outputs.img_tag }}
108108

109+
- name: Pin productionstack subchart to latest ACR tag
110+
if: ${{ matrix.image_name == 'workspace' }}
111+
run: |
112+
registry_name="${REGISTRY%%.*}"
113+
productionstack_tag="$(az acr repository show-tags \
114+
--name "${registry_name}" \
115+
--repository 'helm/productionstack' \
116+
--orderby time_desc \
117+
--top 1 \
118+
--output tsv)"
119+
if [[ -z "${productionstack_tag}" ]]; then
120+
echo 'No productionstack tags found in ACR' >&2
121+
exit 1
122+
fi
123+
124+
export PRODUCTIONSTACK_REPOSITORY="oci://${REGISTRY}/helm"
125+
export PRODUCTIONSTACK_TAG="${productionstack_tag}"
126+
yq -i '(.dependencies[] | select(.name == "productionstack") | .repository) = strenv(PRODUCTIONSTACK_REPOSITORY) |
127+
(.dependencies[] | select(.name == "productionstack") | .version) = strenv(PRODUCTIONSTACK_TAG)' "${CHART_PATH}/Chart.yaml"
128+
helm dependency update "${CHART_PATH}"
129+
env:
130+
CHART_PATH: ${{ matrix.chart_path }}
131+
REGISTRY: ${{ secrets.KAITO_ACR_REGISTRY }}
132+
109133
- name: Package and push chart ${{ matrix.image_name }}:${{ steps.get-image-tag.outputs.img_tag }}
110134
run: |
111135
make "${{ matrix.make_chart_target }}" \

0 commit comments

Comments
 (0)