Skip to content

Commit

Permalink
ff-prod PR deploys URLs. Remoe unusded code
Browse files Browse the repository at this point in the history
  • Loading branch information
gpmayorga committed Mar 25, 2024
1 parent 31222a0 commit cdac0b4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
20 changes: 14 additions & 6 deletions .github/actions/prepare-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:


pinning:
if: ${{ inputs.environment != 'ff-prod' }}
name: pinning
uses: ./.github/workflows/pinning-api.yml
secrets: inherit
Expand All @@ -27,7 +26,6 @@ jobs:


onboarding:
if: ${{ inputs.environment != 'ff-prod' }}
name: onboarding
uses: ./.github/workflows/onboarding-api.yml
secrets: inherit
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/dev-n-ffprod-deploys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
deploy_env: 'ff-prod'

0 comments on commit cdac0b4

Please sign in to comment.