Skip to content

Commit

Permalink
⏪ Restore missing deployment scripts (#252)
Browse files Browse the repository at this point in the history
* Also updates virtru-sdk
  • Loading branch information
dmihalcik-virtru authored Aug 16, 2023
1 parent 49656d9 commit c4caabe
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 3 deletions.
69 changes: 68 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Deploy using gitflow
#
# Basic idea:
# * Developers almost always push to main first.
# * Releases happen on a branch
# * They can cherry-pick (or ffwd-merge, aka no-fault rebase) to releases
# * Once a release goes out it is tagged. Tags are on releases, these may or
# may not be in a history.
#
# Where do deployments go:
# main -> develop01
# feature/* -> develop[X] after select
# release/* -> staging
# v* -> production after block & shout

env:
AWS_ACCOUNT_ALIAS: common
Expand All @@ -8,5 +22,58 @@ env:
USE_NODE_18: true

steps:
- label: ':gear: build & run tests'
- label: ':gear: build & run unit tests'
command: 'buildkite-agent pipeline upload .buildkite/pr.yml'

- wait

- label: ':gear: :rocket: develop'
trigger: protect-and-track-deploy
build:
message: '[develop] ${BUILDKITE_MESSAGE}'
commit: '${BUILDKITE_COMMIT}'
branch: '${BUILDKITE_BRANCH}'
env:
BLOCK_DEPLOY: 'build.branch =~ /^feature\//'
OIDC_CLIENT_ID: '${OIDC_CLIENT_ID_DEVELOP}'
S3_PATH: protect-develop
VIRTRU_ENV: ${VIRTRU_ENV:-develop01}
branches: main feature/*

- wait

- label: ':gear: :rocket: staging'
trigger: protect-and-track-deploy
build:
message: '[staging] ${BUILDKITE_MESSAGE}'
commit: '${BUILDKITE_COMMIT}'
branch: '${BUILDKITE_BRANCH}'
env:
BLOCK_DEPLOY: 'build.branch == "main"'
OIDC_CLIENT_ID: '${OIDC_CLIENT_ID_STAGING}'
S3_PATH: 'protect-staging'
VIRTRU_ENV: staging
branches: 'main release/*'

- wait

- label: ':gear: :rocket: production [blocked]'
trigger: protect-and-track-deploy
build:
message: '[production] ${BUILDKITE_MESSAGE}'
commit: '${BUILDKITE_COMMIT}'
branch: '${BUILDKITE_BRANCH}'
env:
OIDC_CLIENT_ID: '${OIDC_CLIENT_ID_PRODUCTION}'
S3_PATH: 'protect'
VIRTRU_ENV: production
branches: 'release/*'

- wait

- block: 'Tag release?'
branches: 'release/*'

- label: 'Tag Release'
command: '.buildkite/scripts/cut-release.sh'
branches: 'release/*'
21 changes: 21 additions & 0 deletions .buildkite/post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Build and deploy to one of develop, staging, or production.
#
# Variables:
# VIRTRU_ENV: Environment to release to
# S3_PATH: path upload contents to on S3
# BLOCK_DEPLOY: [optional, defaults to true]

env:
AWS_ACCOUNT_ALIAS: ${AWS_ACCOUNT_ALIAS}
ENVIRONMENT_NAME: ${ENVIRONMENT_NAME}
DEPLOY_ENVIRONMENT_NAME: ${DEPLOY_ENVIRONMENT_NAME}
S3_HOSTNAME: ${S3_HOSTNAME}
TEST_ENVIRONMENT_NAME: ${VIRTRU_ENV}
USE_NODE_16: ${USE_NODE_16:-}

steps:
- command: 'npm run test-e2e'
label: ':chrome: E2E Tests: $TEST_ENVIRONMENT_NAME'
artifact_paths: 'e2e/reports/*.html'
concurrency: 3
concurrency_group: 'desktop-chrome-sdk'
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redux-zero": "^5.1.7",
"virtru-sdk": "^5.1.1-beta.14.1"
"virtru-sdk": "^5.1.1-alpha.1.1"
},
"license": "MIT",
"repository": {
Expand Down

0 comments on commit c4caabe

Please sign in to comment.