Skip to content

Commit

Permalink
tests: fix chart workflow
Browse files Browse the repository at this point in the history
update to the newer repo/registry templating.

Signed-off-by: Francesco Giudici <[email protected]>
  • Loading branch information
fgiudici committed Aug 21, 2023
1 parent 080c86c commit 9fc9d1e
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Build chart for release
if: startsWith(github.ref, 'refs/tags/')
run: |
REPO=quay.io/costoolkit/elemental-operator REPO_SEEDIMAGE=quay.io/costoolkit/elemental-seedimage TAG=${GITHUB_REF##*/} make chart
REGISTRY_URL=quay.io/costoolkit REPO=elemental-operator REPO_SEEDIMAGE=elemental-seedimage TAG=${GITHUB_REF##*/} make chart
- name: Publish chart to release
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -45,21 +45,30 @@ jobs:
- name: Test chart values
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
REGISTRY_URL=$(helm show values ${{ steps.chart.outputs.chart_name }}|yq .registry_url))
REPO=$(helm show values ${{ steps.chart.outputs.chart_name }}|yq .image.repository)
TAG=$(helm show values ${{ steps.chart.outputs.chart_name }}|yq .image.tag)
if [ "$REPO" != "quay.io/costoolkit/elemental-operator-ci" ];then
if [ "$REGISTRY_URL" != "quay.io/coostoolkit" ]; then
echo "registry_url on the built chart is not the expected value"
echo "Expected quay.io/coostoolkit but got $REGISTRY_URL"
fi
if [ "$REPO" != "elemental-operator-ci" ];then
echo "REPO on the built chart is not the expected value"
echo "Expected quay.io/costoolkit/elemental-operator but got $REPO"
echo "Expected elemental-operator-ci but got $REPO"
exit 1
fi
- name: Test release chart values
if: startsWith(github.ref, 'refs/tags/')
run: |
REGISTRY_URL=$(helm show values ${{ steps.chart.outputs.chart_name }}|yq .registry_url))
REPO=$(helm show values ${{ steps.chart.outputs.chart_name }}|yq .image.repository)
TAG=$(helm show values ${{ steps.chart.outputs.chart_name }}|yq .image.tag)
if [ "$REPO" != "quay.io/costoolkit/elemental-operator" ];then
if [ "$REGISTRY_URL" != "quay.io/coostoolkit" ]; then
echo "registry_url on the built chart is not the expected value"
echo "Expected quay.io/coostoolkit but got $REGISTRY_URL"
fi
if [ "$REPO" != "elemental-operator" ];then
echo "REPO on the built chart is not the expected value"
echo "Expected quay.io/costoolkit/elemental-operator but got $REPO"
echo "Expected elemental-operator but got $REPO"
exit 1
fi
if [ "$TAG" != "${GITHUB_REF##*/}" ];then
Expand Down

0 comments on commit 9fc9d1e

Please sign in to comment.