From 431eb84437066c062f272e6294a47fc55fa349c6 Mon Sep 17 00:00:00 2001 From: Kalyana Vadlamani Date: Tue, 2 Apr 2024 21:50:00 +0100 Subject: [PATCH] HEAT-227: Updated ipeline --- .github/workflows/deploy.yml | 37 ++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ea6f6a6..a67eac5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -51,26 +51,47 @@ jobs: - name: Set Kubernetes Namespace secrets id: set_namespace_secrets run: | - case "${{ inputs.github_environment }}" in - ("development") + if [[ "${{ inputs.github_environment }}" == "development" ]]; then api=https://"{{ secrets.DEVELOPMENT_KUBE_CLUSTER }}" cert="${{ secrets.DEVELOPMENT_KUBE_CERT }}" cluster="${{ secrets.DEVELOPMENT_KUBE_CLUSTER }}" namespace="${{ secrets.DEVELOPMENT_KUBE_NAMESPACE }}" token="${{ secrets.DEVELOPMENT_KUBE_TOKEN }}" - ;; - ("production") + elif [[ "${{ inputs.github_environment }}" == "production" ]]; then api=https://"{{ secrets.PRODUCTION_KUBE_CLUSTER }}" cert="${{ secrets.PRODUCTION_KUBE_CERT }}" cluster="${{ secrets.PRODUCTION_KUBE_CLUSTER }}" namespace="${{ secrets.PRODUCTION_KUBE_NAMESPACE }}" token="${{ secrets.PRODUCTION_KUBE_TOKEN }}" - ;; - (*) + else echo "Invalid Github environment/namespace specified: ${{ inputs.github_environment }}" exit 1 - ;; - esac + fi + + + + + + # case "${{ inputs.github_environment }}" in + # ("development") + # api=https://"{{ secrets.DEVELOPMENT_KUBE_CLUSTER }}" + # cert="${{ secrets.DEVELOPMENT_KUBE_CERT }}" + # cluster="${{ secrets.DEVELOPMENT_KUBE_CLUSTER }}" + # namespace="${{ secrets.DEVELOPMENT_KUBE_NAMESPACE }}" + # token="${{ secrets.DEVELOPMENT_KUBE_TOKEN }}" + # ;; + # ("production") + # api=https://"{{ secrets.PRODUCTION_KUBE_CLUSTER }}" + # cert="${{ secrets.PRODUCTION_KUBE_CERT }}" + # cluster="${{ secrets.PRODUCTION_KUBE_CLUSTER }}" + # namespace="${{ secrets.PRODUCTION_KUBE_NAMESPACE }}" + # token="${{ secrets.PRODUCTION_KUBE_TOKEN }}" + # ;; + # (*) + # echo "Invalid Github environment/namespace specified: ${{ inputs.github_environment }}" + # exit 1 + # ;; + # esac