From 4d3f83215660fb1f004b5deeb10c4e6acb9cca86 Mon Sep 17 00:00:00 2001 From: Kalyana Vadlamani Date: Tue, 2 Apr 2024 14:32:12 +0100 Subject: [PATCH] HEAT-227: Updated ipeline --- .github/actions/get-env-details/action.yml | 4 ++-- .github/workflows/deploy.yml | 10 +++++----- .github/workflows/pipeline.yml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/get-env-details/action.yml b/.github/actions/get-env-details/action.yml index 0241b75..1d067eb 100644 --- a/.github/actions/get-env-details/action.yml +++ b/.github/actions/get-env-details/action.yml @@ -23,7 +23,7 @@ runs: id: cloud-platform shell: bash run: | - if [ '${{ inputs.environment }}' == 'development' ]; then namespace='development'; fi - if [ '${{ inputs.environment }}' == 'production' ]; then namespace='production'; fi + if [ '${{ inputs.environment }}' == 'dev' ]; then namespace='dev'; fi + if [ '${{ inputs.environment }}' == 'prod' ]; then namespace='prod'; fi echo "namespace=${namespace}" | tee -a "$GITHUB_OUTPUT" echo "values-file=values-${namespace}.yml" | tee -a "$GITHUB_OUTPUT" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ec30659..cf923d8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -54,12 +54,12 @@ jobs: - name: Set Deployment namespace id: set_namespace run: | - if [[ "${{ inputs.environment }}" == "production" ]]; then - echo "::set-output name=namespace::production" - elif [[ "${{ inputs.environment }}" == "production" ]]; then - echo "::set-output name=namespace::production" + if [[ "${{ inputs.github_environment }}" == "dev" ]]; then + echo "::set-output name=namespace::dev" + elif [[ "${{ inputs.github_environment }}" == "prod" ]]; then + echo "::set-output name=namespace::prod" else - echo "Invalid environment specified: ${{ inputs.environment }}" + echo "Invalid environment specified: ${{ inputs.github_environment }}" exit 1 fi diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 16c3d26..cb90076 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -38,8 +38,8 @@ jobs: deploy_to_prod: name: Deploy to prod uses: ./.github/workflows/deploy.yml - # needs: - # - deploy_to_dev # wait for the deploy_to_dev job to complete + needs: + - deploy_to_dev # wait for the deploy_to_dev job to complete with: github_environment: production environment: prod