swap helm charts call to GHA
This commit is contained in:
parent
72914d873c
commit
05b1a41e14
1 changed files with 13 additions and 6 deletions
|
@ -21,17 +21,24 @@ jobs:
|
||||||
echo "chart version (${chart_tag}) did not match git version (${git_tag})"
|
echo "chart version (${chart_tag}) did not match git version (${git_tag})"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
- run:
|
||||||
|
name: install gh tool
|
||||||
|
command: |
|
||||||
|
version="2.22.1"
|
||||||
|
curl --show-error --silent --location --output "gh.tar.gz" "https://github.com/cli/cli/releases/download/v${version}/gh_${version}_linux_amd64.tar.gz"
|
||||||
|
tar -xvzf gh.tar.gz && mkdir -p bin && mv "gh_${version}_linux_amd64/bin/gh" bin/
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: update helm-charts index
|
name: update helm-charts index
|
||||||
environment:
|
environment:
|
||||||
RELEASE_TAG: << pipeline.parameters.release-tag >>
|
RELEASE_TAG: << pipeline.parameters.release-tag >>
|
||||||
command: |
|
command: |
|
||||||
curl --show-error --silent --fail --user "${CIRCLE_TOKEN}:" \
|
export GITHUB_TOKEN="${HELM_CHARTS_GITHUB_TOKEN}"
|
||||||
-X POST \
|
gh workflow run .github/workflows/publish-charts.yml \
|
||||||
-H 'Content-Type: application/json' \
|
--repo hashicorp/helm-charts \
|
||||||
-H 'Accept: application/json' \
|
--ref main \
|
||||||
-d "{\"branch\": \"main\",\"parameters\":{\"SOURCE_REPO\": \"${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}\",\"SOURCE_TAG\": \"${RELEASE_TAG:-$CIRCLE_TAG}\"}}" \
|
-f SOURCE_TAG="${CIRCLE_TAG}" \
|
||||||
"${CIRCLE_ENDPOINT}/${CIRCLE_PROJECT}/pipeline"
|
-f SOURCE_REPO="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
|
||||||
- slack/status:
|
- slack/status:
|
||||||
fail_only: true
|
fail_only: true
|
||||||
failure_message: "Failed to trigger an update to the helm charts index. Check the logs at: ${CIRCLE_BUILD_URL}"
|
failure_message: "Failed to trigger an update to the helm charts index. Check the logs at: ${CIRCLE_BUILD_URL}"
|
||||||
|
|
Loading…
Reference in a new issue