ARC runners: deploy.yml
This commit is contained in:
136
.github/workflows/deploy.yml
vendored
136
.github/workflows/deploy.yml
vendored
@@ -15,6 +15,10 @@ env:
|
|||||||
PROJECT: ota-admin-portal
|
PROJECT: ota-admin-portal
|
||||||
REGISTRY: fiskercloud.azurecr.io
|
REGISTRY: fiskercloud.azurecr.io
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-dev:
|
build-dev:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -27,7 +31,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Azure Login
|
- name: Azure Login
|
||||||
uses: azure/login@v1
|
uses: azure/login@v2
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
||||||
|
|
||||||
@@ -60,25 +64,37 @@ jobs:
|
|||||||
|
|
||||||
deploy-dev:
|
deploy-dev:
|
||||||
needs: [build-dev]
|
needs: [build-dev]
|
||||||
runs-on: [self-hosted, azure]
|
runs-on: [ arc-azure-dev ]
|
||||||
environment: dev
|
environment: dev
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: rtCamp/action-slack-notify@v2
|
- name: Notify deploy
|
||||||
|
uses: rtCamp/action-slack-notify@v2
|
||||||
env:
|
env:
|
||||||
MSG_MINIMAL: true
|
MSG_MINIMAL: true
|
||||||
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to dev... :partydeploy:"
|
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to dev... :partydeploy:"
|
||||||
|
|
||||||
- name: Deploy to dev
|
- name: Deploy to dev
|
||||||
run: |-
|
id: deploy
|
||||||
helm upgrade \
|
uses: koslib/helm-eks-action@v1.28.0
|
||||||
--kube-context dev \
|
env:
|
||||||
--set image.registry=$REGISTRY \
|
KUBE_CONFIG_DATA: ${{ secrets.KUBECONFIG_AZURE_DEV }}
|
||||||
--set image.name=$PROJECT \
|
with:
|
||||||
--set image.tag=$TAG-dev \
|
command: |
|
||||||
--wait -i -f k8s/values-dev.yaml $PROJECT k8s/
|
helm upgrade \
|
||||||
|
--atomic \
|
||||||
|
--create-namespace \
|
||||||
|
--namespace default \
|
||||||
|
--set image.registry=$REGISTRY \
|
||||||
|
--set image.name=$PROJECT \
|
||||||
|
--set image.tag=$TAG-dev \
|
||||||
|
--wait -i -f k8s/values-dev.yaml $PROJECT k8s/
|
||||||
|
|
||||||
|
- name: Deploy Response
|
||||||
|
run: echo "Response was ${{ steps.deploy.outputs.response }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Notify deploy failure
|
- name: Notify deploy failure
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
@@ -104,7 +120,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Azure Login
|
- name: Azure Login
|
||||||
uses: azure/login@v1
|
uses: azure/login@v2
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
||||||
|
|
||||||
@@ -137,26 +153,38 @@ jobs:
|
|||||||
|
|
||||||
deploy-preprod:
|
deploy-preprod:
|
||||||
needs: [deploy-dev, build-preprod]
|
needs: [deploy-dev, build-preprod]
|
||||||
runs-on: [self-hosted, azure]
|
runs-on: [ arc-azure-preprod ]
|
||||||
environment: stg
|
environment: preprod
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: rtCamp/action-slack-notify@v2
|
- name: Notify deploy
|
||||||
|
uses: rtCamp/action-slack-notify@v2
|
||||||
env:
|
env:
|
||||||
MSG_MINIMAL: true
|
MSG_MINIMAL: true
|
||||||
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to preprod... :partydeploy:"
|
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to preprod... :partydeploy:"
|
||||||
|
|
||||||
- name: Deploy to preprod
|
- name: Deploy to preprod
|
||||||
run: |-
|
id: deploy
|
||||||
helm upgrade \
|
uses: koslib/helm-eks-action@v1.28.0
|
||||||
--kube-context prd \
|
env:
|
||||||
--set image.registry=$REGISTRY \
|
KUBE_CONFIG_DATA: ${{ secrets.KUBECONFIG_AZURE_PREPROD }}
|
||||||
--set image.name=$PROJECT \
|
with:
|
||||||
--set image.tag=$TAG-prd \
|
command: |
|
||||||
--wait -i -f k8s/values-prd.yaml $PROJECT k8s/
|
helm upgrade \
|
||||||
|
--atomic \
|
||||||
|
--create-namespace \
|
||||||
|
--namespace default \
|
||||||
|
--set image.registry=$REGISTRY \
|
||||||
|
--set image.name=$PROJECT \
|
||||||
|
--set image.tag=$TAG-prd \
|
||||||
|
--wait -i -f k8s/values-prd.yaml $PROJECT k8s/
|
||||||
|
|
||||||
|
- name: Deploy Response
|
||||||
|
run: echo "Response was ${{ steps.deploy.outputs.response }}"
|
||||||
|
|
||||||
- name: Notify deploy failure
|
- name: Notify deploy failure
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: rtCamp/action-slack-notify@v2
|
uses: rtCamp/action-slack-notify@v2
|
||||||
@@ -181,7 +209,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Azure Login
|
- name: Azure Login
|
||||||
uses: azure/login@v1
|
uses: azure/login@v2
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
||||||
|
|
||||||
@@ -214,26 +242,38 @@ jobs:
|
|||||||
|
|
||||||
deploy-cec-prd:
|
deploy-cec-prd:
|
||||||
needs: [deploy-dev, deploy-preprod, build-cec-prd]
|
needs: [deploy-dev, deploy-preprod, build-cec-prd]
|
||||||
runs-on: [self-hosted, azure]
|
runs-on: [ arc-azure-cec-prd ]
|
||||||
environment: prd
|
environment: prd
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: rtCamp/action-slack-notify@v2
|
- name: Notify deploy
|
||||||
|
uses: rtCamp/action-slack-notify@v2
|
||||||
env:
|
env:
|
||||||
MSG_MINIMAL: true
|
MSG_MINIMAL: true
|
||||||
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to cec-prd... :partydeploy:"
|
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to cec-prd... :partydeploy:"
|
||||||
|
|
||||||
- name: Deploy to cec-prd
|
- name: Deploy to cec-prd
|
||||||
run: |-
|
id: deploy
|
||||||
helm upgrade \
|
uses: koslib/helm-eks-action@v1.28.0
|
||||||
--kube-context cec-prd-cluster-1 \
|
env:
|
||||||
--set image.registry=$REGISTRY \
|
KUBE_CONFIG_DATA: ${{ secrets.KUBECONFIG_AZURE_CEC_PRD }}
|
||||||
--set image.name=$PROJECT \
|
with:
|
||||||
--set image.tag=$TAG-cec-prd \
|
command: |
|
||||||
--wait -i -f k8s/values-cec-prd.yaml $PROJECT k8s/
|
helm upgrade \
|
||||||
|
--atomic \
|
||||||
|
--create-namespace \
|
||||||
|
--namespace default \
|
||||||
|
--set image.registry=$REGISTRY \
|
||||||
|
--set image.name=$PROJECT \
|
||||||
|
--set image.tag=$TAG-cec-prd \
|
||||||
|
--wait -i -f k8s/values-cec-prd.yaml $PROJECT k8s/
|
||||||
|
|
||||||
|
- name: Deploy Response
|
||||||
|
run: echo "Response was ${{ steps.deploy.outputs.response }}"
|
||||||
|
|
||||||
- name: Notify deploy failure
|
- name: Notify deploy failure
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: rtCamp/action-slack-notify@v2
|
uses: rtCamp/action-slack-notify@v2
|
||||||
@@ -258,7 +298,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Azure Login
|
- name: Azure Login
|
||||||
uses: azure/login@v1
|
uses: azure/login@v2
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
||||||
|
|
||||||
@@ -291,25 +331,37 @@ jobs:
|
|||||||
|
|
||||||
deploy-cec-euprd:
|
deploy-cec-euprd:
|
||||||
needs: [deploy-dev, deploy-preprod, build-cec-euprd]
|
needs: [deploy-dev, deploy-preprod, build-cec-euprd]
|
||||||
runs-on: [self-hosted, azure]
|
runs-on: [ arc-azure-cec-euprd ]
|
||||||
environment: prd
|
environment: prd
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: rtCamp/action-slack-notify@v2
|
- name: Notify deploy
|
||||||
|
uses: rtCamp/action-slack-notify@v2
|
||||||
env:
|
env:
|
||||||
MSG_MINIMAL: true
|
MSG_MINIMAL: true
|
||||||
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to cec-euprd... :partydeploy:"
|
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to cec-euprd... :partydeploy:"
|
||||||
|
|
||||||
- name: Deploy to cec-euprd
|
- name: Deploy to cec-euprd
|
||||||
run: |-
|
id: deploy
|
||||||
helm upgrade \
|
uses: koslib/helm-eks-action@v1.28.0
|
||||||
--kube-context cec-euprd-cluster-1 \
|
env:
|
||||||
--set image.registry=$REGISTRY \
|
KUBE_CONFIG_DATA: ${{ secrets.KUBECONFIG_AZURE_CEC_EUPRD }}
|
||||||
--set image.name=$PROJECT \
|
with:
|
||||||
--set image.tag=$TAG-cec-euprd \
|
command: |
|
||||||
--wait -i -f k8s/values-cec-euprd.yaml $PROJECT k8s/
|
helm upgrade \
|
||||||
|
--atomic \
|
||||||
|
--create-namespace \
|
||||||
|
--namespace default \
|
||||||
|
--set image.registry=$REGISTRY \
|
||||||
|
--set image.name=$PROJECT \
|
||||||
|
--set image.tag=$TAG-cec-euprd \
|
||||||
|
--wait -i -f k8s/values-cec-euprd.yaml $PROJECT k8s/
|
||||||
|
|
||||||
|
- name: Deploy Response
|
||||||
|
run: echo "Response was ${{ steps.deploy.outputs.response }}"
|
||||||
|
|
||||||
|
|
||||||
- name: Notify deploy failure
|
- name: Notify deploy failure
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
|
|||||||
Reference in New Issue
Block a user