From cdac0b47bf668ae60e215595f4b27f23fae7ab5c Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Mon, 25 Mar 2024 18:31:57 +0100 Subject: [PATCH] ff-prod PR deploys URLs. Remoe unusded code --- .github/actions/prepare-deploy/action.yml | 20 ++++++++++++++------ .github/workflows/deploy_all.yml | 2 -- .github/workflows/dev-n-ffprod-deploys.yml | 18 +++++++----------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/actions/prepare-deploy/action.yml b/.github/actions/prepare-deploy/action.yml index 32c0c1a83e..99aca9aaf4 100644 --- a/.github/actions/prepare-deploy/action.yml +++ b/.github/actions/prepare-deploy/action.yml @@ -71,14 +71,22 @@ runs: echo "front_url=app-demo.k-f.dev" >> $GITHUB_OUTPUT echo "env_name=demo" >> $GITHUB_OUTPUT elif ${{ inputs.deploy_to == 'ff-prod' }}; then - # FF-PRODUCTION - # A build from the DEV env that points to prod - echo "function_name=${{ inputs.app_base_name }}-ff-production" >> $GITHUB_OUTPUT - echo "front_url=app-ff-production.k-f.dev" >> $GITHUB_OUTPUT - echo "env_name=production" >> $GITHUB_OUTPUT + if ${{ github.event_name == 'pull_request' }}; then + # FF-PRODUCTION-PR + # A build from the DEV env that points to prod + echo "function_name=${{ inputs.app_base_name }}-pr${{ github.event.number }}-ff-production" >> $GITHUB_OUTPUT + echo "front_url=pr${{ github.event.number }}-app-ff-production.k-f.dev" >> $GITHUB_OUTPUT + echo "env_name=production" >> $GITHUB_OUTPUT + elif ${{ github.ref == 'refs/heads/main' }}; then + # FF-PRODUCTION-MAIN + # A build from the DEV env that points to prod + echo "function_name=NEVER_USED" >> $GITHUB_OUTPUT + echo "front_url=app-ff-production.k-f.dev" >> $GITHUB_OUTPUT + echo "env_name=production" >> $GITHUB_OUTPUT + fi elif ${{ github.ref == 'refs/heads/main' }}; then # DEV - echo "function_name=${{ inputs.app_base_name }}-dev" >> $GITHUB_OUTPUT + echo "function_name=NEVER_USED" >> $GITHUB_OUTPUT echo "front_url=app-dev.k-f.dev" >> $GITHUB_OUTPUT echo "env_name=development" >> $GITHUB_OUTPUT elif ${{ github.event_name == 'pull_request' }}; then diff --git a/.github/workflows/deploy_all.yml b/.github/workflows/deploy_all.yml index 54d07b73db..bff2212366 100644 --- a/.github/workflows/deploy_all.yml +++ b/.github/workflows/deploy_all.yml @@ -18,7 +18,6 @@ jobs: pinning: - if: ${{ inputs.environment != 'ff-prod' }} name: pinning uses: ./.github/workflows/pinning-api.yml secrets: inherit @@ -27,7 +26,6 @@ jobs: onboarding: - if: ${{ inputs.environment != 'ff-prod' }} name: onboarding uses: ./.github/workflows/onboarding-api.yml secrets: inherit diff --git a/.github/workflows/dev-n-ffprod-deploys.yml b/.github/workflows/dev-n-ffprod-deploys.yml index ce25cb3365..927fccd13a 100644 --- a/.github/workflows/dev-n-ffprod-deploys.yml +++ b/.github/workflows/dev-n-ffprod-deploys.yml @@ -7,20 +7,16 @@ on: # - '.github/workflows/main-branch-deploys.yml' jobs: - main_branch: + development: if: github.ref == 'refs/heads/main' - name: deploy-${{ matrix.env }} - strategy: - matrix: - env: ['ff-prod', 'development'] + name: deploy-development uses: ./.github/workflows/deploy_all.yml secrets: inherit with: - environment: ${{ matrix.env }} - - pull_request: - if: github.event_name == 'pull_request' - uses: ./.github/workflows/deploy_all.yml + environment: development +# For FF-PROD deploy only webApp + ff-prod: + uses: ./.github/workflows/centrifuge-app.yml secrets: inherit with: - environment: 'ff-prod' \ No newline at end of file + deploy_env: 'ff-prod' \ No newline at end of file