qpa-server/.gitlab-ci.yml

32 lines
680 B
YAML
Raw Normal View History

2019-10-03 16:03:11 +02:00
stages:
- build
2019-10-03 16:53:27 +02:00
- release
2019-10-03 13:10:54 +02:00
build:
2019-10-03 16:57:49 +02:00
stage: build
2019-10-03 16:53:27 +02:00
image: node:10.16
2019-10-03 17:15:44 +02:00
artifacts:
paths:
- dist
expire_in: 1 week
2019-10-03 16:53:27 +02:00
script:
- curl -o- -L https://yarnpkg.com/install.sh | bash
2019-10-03 17:04:35 +02:00
- yarn; yarn build
2019-10-04 15:51:36 +02:00
- ls dist/
2019-10-04 15:59:14 +02:00
- (cd dist; find .)
- (cd lib; find .)
2019-10-03 16:53:27 +02:00
release:
stage: release
2019-10-03 16:11:55 +02:00
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
2019-10-05 10:17:55 +02:00
variables:
2019-10-05 10:15:11 +02:00
GOOGLE_APPLICATION_CREDENTIALS: /secret.json
2019-10-03 13:10:54 +02:00
script:
2019-10-05 10:21:53 +02:00
- cat $GCS_SERVICE_ACCOUNT_KEY > /secret.json
2019-10-03 17:40:58 +02:00
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination eu.gcr.io/qpa-staging-237606/api:$CI_COMMIT_TAG
2019-10-03 17:27:22 +02:00
only:
- tags
2019-10-03 16:03:11 +02:00