Release chart for service: zero-trust-web-access version: 1.5.0 minor #309
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Helm Chart Latest App Version Release | |
on: | |
deployment: | |
concurrency: | |
group: Helm-Chart-Latest-App-Version-Release-${{ github.ref }} | |
env: | |
service: ${{ github.event.deployment.payload.service }} | |
major_minor_patch: ${{ github.event.deployment.payload.major_minor_patch }} | |
app_version: ${{ github.event.deployment.payload.app_version }} | |
run-name: "Release chart for service: ${{ github.event.deployment.payload.service }} version: ${{ github.event.deployment.payload.app_version }} ${{ github.event.deployment.payload.major_minor_patch }}" | |
jobs: | |
update-latest-helm-chart-version: | |
if: github.event.deployment.task == 'update-latest-version' | |
runs-on: ubuntu-20.04 | |
outputs: | |
new_chart_version: ${{ steps.release.outputs.new_chart_version }} | |
charts: ${{ steps.release.outputs.charts }} | |
updated_charts_summary: ${{ steps.release.outputs.updated_charts_summary }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.AKEYLESS_CI_COMMIT_PUSH_TOKEN }} | |
- name: Fetch history | |
run: git fetch --prune --unshallow | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Update latest helm chart version | |
id: release | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github.event.deployment) }} | |
run: .github/scripts/latest_version_release.sh | |
- uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.AKEYLESS_CI_COMMIT_PUSH_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: 'akeylesslabs', | |
repo: 'akeyless-k8s-manifests', | |
workflow_id: 'update-chart.yml', | |
ref: 'main' | |
}) | |
Slack-Notification-on-success: | |
name: Slack-On-Success-Notification | |
runs-on: ubuntu-20.04 | |
needs: [ update-latest-helm-chart-version ] | |
if: (github.event.deployment.task == 'update-latest-version') | |
env: | |
new_chart_version: ${{ needs.update-latest-helm-chart-version.outputs.new_chart_version }} | |
charts: ${{ needs.update-latest-helm-chart-version.outputs.charts }} | |
updated_charts_summary: ${{ needs.update-latest-helm-chart-version.outputs.updated_charts_summary }} | |
steps: | |
- name: Prepare Slack Message On Success | |
id: slack-message-success-creator | |
run: | | |
SLACK_MESSAGE="*Service:* $service | |
*Bump version:* $major_minor_patch | |
*App Version:* $app_version | |
*Charts:* $charts | |
*Release summary:* $updated_charts_summary | |
:helm:" | |
delimiter="$(openssl rand -hex 8)" | |
echo "slack-message<<${delimiter}" >> $GITHUB_ENV | |
echo "${SLACK_MESSAGE//$/%0A}" >> $GITHUB_ENV | |
echo "${delimiter}" >> $GITHUB_ENV | |
- name: Slack Success Notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: 'operations' | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_ICON: https://github.com/rtCamp.png?size=48 | |
SLACK_TITLE: Helm Chart Latest Version Release Updated | |
SLACK_MESSAGE: '${{ env.slack-message }}' | |
SLACK_USERNAME: githubBot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_OPERATIONS_WEBHOOK }} | |
MSG_MINIMAL: true | |
SLACK_FOOTER: Akeyless.io Helm Chart Latest Version Release | |
Slack-Notification-on-failure: | |
name: Slack-On-Failure-Notification | |
runs-on: ubuntu-20.04 | |
needs: [ update-latest-helm-chart-version ] | |
if: (failure() && needs.*.result != 'success') && (github.event.deployment.task == 'update-latest-version') | |
env: | |
charts: ${{ needs.update-latest-helm-chart-version.outputs.charts }} | |
steps: | |
- name: Prepare Slack Message On Failure | |
id: slack-message-failure-creator | |
run: | | |
SLACK_MESSAGE="*Service:* $service | |
*Bump version:* $major_minor_patch | |
*App Version:* $app_version | |
*Chart:* $charts | |
*Status:* Failure | |
:terminator:" | |
delimiter="$(openssl rand -hex 8)" | |
echo "slack-message<<${delimiter}" >> $GITHUB_ENV | |
echo "${SLACK_MESSAGE//$/%0A}" >> $GITHUB_ENV | |
echo "${delimiter}" >> $GITHUB_ENV | |
- name: Slack Failure Notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: 'operations' | |
SLACK_COLOR: '#bd3232' | |
SLACK_ICON: https://github.com/rtCamp.png?size=48 | |
SLACK_TITLE: Helm Chart Latest Version Release Failed! | |
SLACK_MESSAGE: '${{ env.slack-message }}' | |
SLACK_USERNAME: githubBot | |
SLACK_WEBHOOK: ${{ secrets.SLACK_OPERATIONS_WEBHOOK }} | |
SLACK_FOOTER: Akeyless.io Helm Chart Latest Version Release |