1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-16 05:19:12 +00:00
trezor-wallet/.gitlab-ci.yml

113 lines
2.0 KiB
YAML
Raw Normal View History

2018-11-02 10:09:36 +00:00
image: node:9.3
2018-10-01 13:12:54 +00:00
2018-10-22 11:04:16 +00:00
cache:
paths:
- node_modules
stages:
- test
- build
- deploy
2018-10-22 10:25:12 +00:00
2018-10-22 11:04:16 +00:00
lint:
stage: test
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-22 11:04:16 +00:00
- yarn run lint
2018-10-01 13:12:54 +00:00
flow:
2018-10-22 11:04:16 +00:00
stage: test
2018-10-01 13:12:54 +00:00
script:
- yarn run flow
2018-10-23 14:31:10 +00:00
unit:
2018-10-22 11:04:16 +00:00
stage: test
2018-10-01 13:12:54 +00:00
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-22 11:04:16 +00:00
- yarn run test
2018-10-01 13:12:54 +00:00
2018-10-23 14:29:33 +00:00
build development:
2018-10-22 11:04:16 +00:00
stage: build
2018-10-01 13:12:54 +00:00
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-22 11:04:16 +00:00
- yarn run build:dev
artifacts:
2018-10-25 14:00:29 +00:00
expire_in: 1 week
2018-10-22 11:04:16 +00:00
paths:
2018-10-23 14:48:54 +00:00
- build/dev
2018-10-22 11:04:16 +00:00
2018-10-23 14:29:33 +00:00
build beta:
2018-10-22 11:04:16 +00:00
stage: build
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-22 11:04:16 +00:00
- yarn run build:beta
artifacts:
2018-10-25 14:00:29 +00:00
expire_in: 1 week
2018-10-22 11:04:16 +00:00
paths:
2018-10-23 14:48:54 +00:00
- build/beta
2018-10-25 13:39:17 +00:00
- scripts/s3sync.sh
2018-10-22 11:04:16 +00:00
2018-10-25 12:47:39 +00:00
build stable:
2018-10-22 11:04:16 +00:00
stage: build
script:
2018-10-25 13:56:55 +00:00
- yarn install
2018-10-24 21:01:23 +00:00
- yarn run build:stable
2018-10-22 11:04:16 +00:00
artifacts:
2018-10-25 14:00:29 +00:00
expire_in: 1 week
2018-10-22 11:04:16 +00:00
paths:
2018-10-24 21:01:23 +00:00
- build/stable
2018-10-25 13:39:17 +00:00
- scripts/s3sync.sh
2018-10-23 14:29:33 +00:00
deploy review:
stage: deploy
variables:
GIT_STRATEGY: none
dependencies:
- build development
2018-11-16 14:16:24 +00:00
environment:
name: $CI_BUILD_REF_NAME
url: $BASE_REVIEW_URL/$CI_BUILD_REF_NAME
2018-10-23 14:29:33 +00:00
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}/"
2018-10-23 14:29:33 +00:00
only:
- branches
tags:
- deploy
2018-10-25 12:47:39 +00:00
deploy stage beta:
stage: deploy
variables:
GIT_STRATEGY: none
2018-10-25 13:39:17 +00:00
AWS_ACCESS_KEY_ID: $STAGE_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $STAGE_AWS_SECRET_ACCESS_KEY
2018-10-25 12:50:15 +00:00
when: manual
2018-10-25 12:47:39 +00:00
dependencies:
- build beta
script:
2018-10-25 13:53:02 +00:00
- scripts/s3sync.sh stage beta
2018-10-25 12:47:39 +00:00
only:
- beta
tags:
- deploy
deploy stage stable:
stage: deploy
variables:
GIT_STRATEGY: none
2018-10-25 13:39:17 +00:00
AWS_ACCESS_KEY_ID: $STAGE_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $STAGE_AWS_SECRET_ACCESS_KEY
2018-10-25 12:50:15 +00:00
when: manual
2018-10-25 12:47:39 +00:00
dependencies:
- build stable
script:
2018-10-25 13:53:02 +00:00
- scripts/s3sync.sh stage stable
2018-10-25 12:47:39 +00:00
only:
- stable
tags:
- deploy