Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manual deploy step with no restrictions. #481

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add manual deploy step with no restrictions.
  • Loading branch information
jsdw authored Jun 16, 2022
commit a9910ccf528b99a82d6735738b37828487b4bb87
20 changes: 17 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ default:

stages:
- build
- deploy-staging
- deploy-commit-to-staging
- deploy-master-to-staging
- deploy-production


Expand Down Expand Up @@ -140,18 +141,31 @@ build-frontend:
DOCKERFILE_DIRECTORY: "./frontend/"
<<: *dockerize

deploy-staging:
# Manually build the docker images and deploy some commit to staging.
deploy-commit-to-staging:
variables:
CONTAINER_REPO_BACKEND: "docker.io/parity/substrate-telemetry-backend"
CONTAINER_REPO_FRONTEND: "docker.io/parity/substrate-telemetry-frontend"
stage: deploy-staging
stage: deploy-commit-to-staging
<<: *deploy
environment:
name: parity-stg
when: manual

# Autoamtically deploy `master` branch or tag like `v1.0` to staging
deploy-master-to-staging:
variables:
CONTAINER_REPO_BACKEND: "docker.io/parity/substrate-telemetry-backend"
CONTAINER_REPO_FRONTEND: "docker.io/parity/substrate-telemetry-frontend"
stage: deploy-master-to-staging
<<: *deploy
environment:
name: parity-stg
rules:
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+.*$/' # i.e. v1.0, v2.1rc1
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

# Manually deploy a tag like `v1.0` to production
deploy-production:
variables:
CONTAINER_REPO_BACKEND: "docker.io/parity/substrate-telemetry-backend"
Expand Down