You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: 'Deploy'
on: [deployment]
jobs:
deployment:
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v1'
- name: Set Test Kubeconfig
if: github.ref == 'refs/heads/test'
run: |
echo "KUBECONFIG_FILE<<EOF" >> $GITHUB_ENV
echo "${{ secrets.TEST_KUBECONFIG }}" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Set Production Kubeconfig
if: github.ref == 'refs/heads/master'
run: |
echo "KUBECONFIG_FILE<<EOF" >> $GITHUB_ENV
echo "${{ secrets.PRODUCTION_KUBECONFIG }}" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: 'Deploy'
# Parameters are pulled directly from the GitHub deployment event so the
# configuration for the job here is very minimal.
uses: 'deliverybot/helm@master'
with:
token: '${{ github.token }}'
secrets: '${{ toJSON(secrets) }}'
version: '${{ github.sha }}'
chart: './charts/my-app'
.github/deploy.yml
production:
production_environment: true
required_contexts: []
environment: production
description: "Production Deployment"
payload:
value_files: ["./values/my-app/values.common.yaml", "./values/my-app/values.production.yaml"]
# Remove the canary deployment if it exists when doing a full prod deploy.
remove_canary: true
release: production-my-app
namespace: production
track: stable
helm: helm3
test:
auto_deploy_on: refs/heads/test
required_contexts: []
environment: test
description: "Test deployment"
payload:
value_files: ["./values/my-app/values.common.yaml", "./values/my-app/values.test.yaml"]
remove_canary: true
release: test-my-app
namespace: test
track: stable
helm: helm3
This works when I push/merge to test branch.
But when i trigger a deployment from the deliverybot web-app targetting test/master , It skips the steps that sets kubeconfig
The text was updated successfully, but these errors were encountered:
theNullP0inter
changed the title
How can I use multiple KUBECONFIG_FILE. Works with auto_deploy_on, fails with manual deploy
How can I use multiple KUBECONFIG_FILE? - Works with auto_deploy_on, fails with manual deploy
Oct 12, 2021
I have 2 k8s clusters - one for production, one for review & staging environment.
Functionality I'm trying to achieve:
This is how my config looks like.
.github/workflows/cd.yml
.github/deploy.yml
This works when I push/merge to test branch.
But when i trigger a deployment from the deliverybot web-app targetting test/master , It skips the steps that sets kubeconfig
The text was updated successfully, but these errors were encountered: