49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
stages:
|
|
- build
|
|
- deploy
|
|
|
|
build:
|
|
stage: build
|
|
image: node:18
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^[\d]\.[\d]\.[\d]-(prod|stage)$/
|
|
script:
|
|
- yarn
|
|
- yarn build
|
|
artifacts:
|
|
paths:
|
|
- dist
|
|
deploy-staging:
|
|
stage: deploy
|
|
environment:
|
|
name: staging
|
|
url: https://api.otpauth-staging.thern.wtf
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^[\d]\.[\d]\.[\d]-stage$/
|
|
tags:
|
|
- shell
|
|
- staging
|
|
variables:
|
|
SECURE_FILES_DOWNLOAD_PATH: ./conf
|
|
DEPLOY_CONTEXT: staging
|
|
DEPLOY_PORT: 8086
|
|
script:
|
|
- curl -s https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer | bash
|
|
- ./deploy_app.sh
|
|
deploy-prod:
|
|
stage: deploy
|
|
environment:
|
|
name: production
|
|
url: https://api.otpauth.thern.wtf
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^[\d]\.[\d]\.[\d]-prod$/
|
|
tags:
|
|
- shell
|
|
- prod
|
|
variables:
|
|
SECURE_FILES_DOWNLOAD_PATH: ./conf
|
|
DEPLOY_CONTEXT: prod
|
|
DEPLOY_PORT: 8083
|
|
script:
|
|
- curl -s https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer | bash
|
|
- ./deploy_app.sh |