DEVOPS-86 match cloud deploy (#104)

This commit is contained in:
Rafi Greenberg
2021-11-09 13:27:49 -08:00
committed by GitHub
parent 251eb63ec1
commit 75deb9b0cd

View File

@@ -13,9 +13,9 @@ jobs:
env: env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_CHANNEL: "#cloud-builds" SLACK_CHANNEL: "#cloud-builds"
SLACK_FOOTER: "Powered by :fisker:" SLACK_FOOTER: ""
SLACK_USERNAME: fiskerBot SLACK_USERNAME: GitHub Actions
SLACK_ICON: "https://github.com/Fisker-Inc.png?size=32" SLACK_ICON: "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
TAG: ${{ github.sha }} TAG: ${{ github.sha }}
PROJECT: ota-admin-portal PROJECT: ota-admin-portal
steps: steps:
@@ -58,6 +58,11 @@ jobs:
tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.PROJECT }}:${{ env.TAG}}-${{ env.ENVIRONMENT }} tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.PROJECT }}:${{ env.TAG}}-${{ env.ENVIRONMENT }}
cache-from: type=registry,ref=${{ steps.login-ecr.outputs.registry }}/${{ env.PROJECT }}:${{ env.TAG}}-${{ env.ENVIRONMENT }} cache-from: type=registry,ref=${{ steps.login-ecr.outputs.registry }}/${{ env.PROJECT }}:${{ env.TAG}}-${{ env.ENVIRONMENT }}
cache-to: type=inline cache-to: type=inline
- name: Notify deploy
uses: rtCamp/action-slack-notify@v2
env:
MSG_MINIMAL: true
SLACK_MESSAGE: "Deploying to ${{ env.ENV }}... :partydeploy:"
- name: Deploy - name: Deploy
id: deploy id: deploy
env: env:
@@ -69,15 +74,17 @@ jobs:
--set image.name=$PROJECT \ --set image.name=$PROJECT \
--set image.tag=$TAG-$ENVIRONMENT \ --set image.tag=$TAG-$ENVIRONMENT \
--wait -i -f k8s/values-$ENVIRONMENT.yaml $PROJECT k8s/ --wait -i -f k8s/values-$ENVIRONMENT.yaml $PROJECT k8s/
- name: Notify if success - name: Notify if success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2 uses: rtCamp/action-slack-notify@v2
env: env:
MSG_MINIMAL: true MSG_MINIMAL: true
SLACK_MESSAGE: Successfully deployed to ${{ env.ENVIRONMENT }}! SLACK_MESSAGE: "Successfully deployed to ${{ env.ENV }}! :gopher_party:"
if: ${{ success() }}
- name: Notify if failure - name: Notify if failure
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2 uses: rtCamp/action-slack-notify@v2
env: env:
SLACK_COLOR: ${{ job.status }} SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: Job failed! SLACK_MESSAGE: "Something failed! :this-is-fine:"
if: ${{ failure() }}