Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add release version to helm chart and grafana annotation #143

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/deploy_helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,16 @@ jobs:
EKSCTL_VERSION: v0.98.0
# renovate: datasource=github-releases depName=helmfile/helmfile
HELMFILE_VERSION: 'v0.155.1'
# TODO: remove sops as it is not used anymore
SOPS_VERSION: v3.7.2
# TODO: remove secrets plugin as it is not used anymore
HELM_SECRETS_PLUGIN_VERSION: v3.8.3
# renovate: datasource=github-releases depName=databus23/helm-diff
HELM_DIFF_PLUGIN_VERSION: v3.9.6
# renovate: datasource=github-releases depName=mikefarah/yq
YQ_VERSION: v4.44.3
run: |
HELMFILE_VERSION_WITHOUT_PREFIX=${HELMFILE_VERSION:1}
curl -fsSL -o eksctl.tar.gz https://github.com/weaveworks/eksctl/releases/download/${{ env.EKSCTL_VERSION }}/eksctl_Linux_amd64.tar.gz
curl -fsSL -o helmfile.tar.gz https://github.com/helmfile/helmfile/releases/download/${{ env.HELMFILE_VERSION }}/helmfile_${HELMFILE_VERSION_WITHOUT_PREFIX}_linux_amd64.tar.gz
curl -fsSL -o sops https://github.com/mozilla/sops/releases/download/${{ env.SOPS_VERSION }}/sops-${{ env.SOPS_VERSION }}.linux
curl -fsSL -o yq https://github.com/mikefarah/yq/releases/download/${{ env.YQ_VERSION }}/yq_linux_amd64

helm plugin install https://github.com/jkroepke/helm-secrets --version ${{ env.HELM_SECRETS_PLUGIN_VERSION }}
helm plugin install https://github.com/databus23/helm-diff --version ${{ env.HELM_DIFF_PLUGIN_VERSION }}

mkdir -p $HOME/.local/bin
Expand Down Expand Up @@ -196,6 +193,14 @@ jobs:
tags: tag:ci
version: 1.72.0

- name: Inject release version to the helm chart
if: inputs.revision != ''
run: |
release=$(git tag --contains "${{ inputs.revision }}")
find . -name "Chart.yaml" | while IFS= read -r file; do
yq -i '.appVersion = '"$release"'-${{ inputs.revision }}' "$file"
done

- name: helmfile ${{ inputs.helmfileCommand }}
run: |
export $(echo ${{ inputs.envVariables }})
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release_marker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,17 @@ jobs:
if: inputs.revision != ''
runs-on: ubuntu-latest
steps:
- name: get release version from revision
id: releaseVer
run: |
release=$(git tag --contains "${{ inputs.revision }}")

- name: mark release
uses: frankie567/[email protected]
with:
apiHost: https://grafana.apify.dev
apiToken: ${{ secrets.grafanaApiToken}}
text: ${{ inputs.environment }} - Deployment of ${{ inputs.revision }}
text: ${{ inputs.environment }} - Deployment of ${{ steps.releaseVer.outputs.stdout }}-${{ inputs.revision }}
tags: deployment,github,${{ inputs.environment }},${{ inputs.grafanaAnnotationTag }}

sentry:
Expand Down
Loading