1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-30 19:00:53 +00:00
trezor-wallet/.gitlab-ci.yml
2018-11-22 14:24:10 +01:00

117 lines
2.0 KiB
YAML

image: node:9.3
cache:
paths:
- node_modules
stages:
- test
- build
- deploy
lint:
stage: test
script:
- yarn install
- yarn run lint
flow:
stage: test
script:
- yarn run flow
unit:
stage: test
script:
- yarn install
- yarn run test
build development:
stage: build
script:
- yarn install
- yarn run build:dev
artifacts:
expire_in: 1 week
paths:
- build/dev
build beta:
stage: build
script:
- yarn install
- yarn run build:beta
only:
- beta
artifacts:
expire_in: 1 week
paths:
- build/beta
- scripts/s3sync.sh
build stable:
stage: build
script:
- yarn install
- yarn run build:stable
only:
- stable
artifacts:
expire_in: 1 week
paths:
- build/stable
- scripts/s3sync.sh
deploy review:
stage: deploy
variables:
GIT_STRATEGY: none
dependencies:
- build development
environment:
name: $CI_BUILD_REF_NAME
url: $BASE_REVIEW_URL/$CI_BUILD_REF_NAME
script:
- echo "Deploy a review app"
- '[ -z "${DEPLOY_BASE_DIR}" ] && echo "Deploy base dir cannot be empty" && exit 255'
- env
- mkdir -p "${DEPLOY_BASE_DIR}/${CI_BUILD_REF_NAME}"
- echo "Copy dev build to web server ${DEPLOY_BASE_DIR}/${CI_BUILD_REF_NAME}..."
- rsync --delete -va build/dev/ "${DEPLOY_BASE_DIR}/${CI_BUILD_REF_NAME}/"
only:
- branches
tags:
- deploy
deploy stage beta:
stage: deploy
variables:
GIT_STRATEGY: none
AWS_ACCESS_KEY_ID: $STAGE_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $STAGE_AWS_SECRET_ACCESS_KEY
when: manual
dependencies:
- build beta
script:
- scripts/s3sync.sh stage beta
only:
- beta
tags:
- deploy
deploy stage stable:
stage: deploy
variables:
GIT_STRATEGY: none
AWS_ACCESS_KEY_ID: $STAGE_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $STAGE_AWS_SECRET_ACCESS_KEY
when: manual
dependencies:
- build stable
script:
- scripts/s3sync.sh stage stable
only:
- stable
tags:
- deploy