Skip to content

Commit

Permalink
Merge pull request #1036 from aligent/feature/wait-for-production-deploy
Browse files Browse the repository at this point in the history
Wait for production deploy in bitbucket pipeline
  • Loading branch information
TheOrangePuff authored Aug 4, 2024
2 parents 72d4ab2 + 2171c74 commit c310ce1
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,6 @@ definitions:
name: 🧪 Test
script:
- npm run test
- step: &deploy-temp-stack
name: 🏗️ Test Deployment
script:
# Generate a random three letter stage name that isn't prd or stg
- TMP_STAGE=$(cat /dev/urandom | tr -dc 'a-z' | head -c3 | grep -vE 'prd|stg')
- echo "Deploy temporary service to stage:\ $TMP_STAGE"
- pipe: docker://aligent/nx-serverless-deploy-pipe:20-alpine
variables:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
CFN_ROLE: ${CFN_ROLE}
DEBUG: ${CI_DEBUG}
STAGE: ${TMP_STAGE}
- pipe: docker://aligent/nx-serverless-deploy-pipe:20-alpine
variables:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
CFN_ROLE: ${CFN_ROLE}
DEBUG: ${CI_DEBUG}
CMD: 'remove'
STAGE: ${TMP_STAGE}
artifacts:
download: false
- step: &push-serverless
name: 🚀 Deploy Service
script:
Expand All @@ -66,13 +43,24 @@ pipelines:
steps:
- step: *test
- step: *lint
- step: *deploy-temp-stack

branches:
production:
- step:
<<: *push-serverless
- stage:
name: 'Awaiting Production Deploy'
steps:
- step:
name: 'Awaiting Production Deploy'
script:
- echo "Awaiting manual trigger of production deploy"
- stage:
name: 'Deploy Production'
deployment: Production
trigger: manual
steps:
- step:
<<: *push-serverless

staging:
- step:
<<: *push-serverless
Expand Down

0 comments on commit c310ce1

Please sign in to comment.