1
0
Fork 0
js-utils/.gitlab-ci.yml

144 lines
2.1 KiB
YAML
Raw Normal View History

2019-09-17 13:05:36 +00:00
include:
2019-09-17 13:08:40 +00:00
- local: /config/gitlab/ci-tools.yml
- local: /config/gitlab/ci-rules.yml
2019-09-17 13:05:36 +00:00
stages:
- status-pre
- build
- image
- publish
- status-post
# build jobs
build-node:
2019-09-17 13:05:36 +00:00
extends:
- .build-node
stage: build
script:
- make ci
artifacts:
when: always
2019-09-17 13:18:30 +00:00
expire_in: 1 day
paths:
2019-09-17 13:05:36 +00:00
- out/
2019-09-17 13:18:30 +00:00
cache:
key: "${CI_COMMIT_REF_SLUG}"
policy: pull-push
paths:
2019-09-17 13:05:36 +00:00
- node_modules/
- out/api
- out/cache
- out/tmp
2019-09-17 13:05:36 +00:00
build-image-alpine-branch:
2019-09-17 13:05:36 +00:00
extends:
- .build-docker
stage: image
except:
- tags
script:
- ./scripts/docker-build.sh --push --default
variables:
IMAGE_ARCH: alpine
2019-09-17 13:05:36 +00:00
build-image-alpine-tag:
extends:
- .build-docker
stage: image
only:
- tags
script:
- ./scripts/docker-build.sh --push --default
variables:
IMAGE_ARCH: alpine
2019-09-17 13:05:36 +00:00
build-image-stretch-branch:
extends: [.build-docker]
2019-09-17 13:05:36 +00:00
stage: image
except:
- tags
script:
- ./scripts/docker-build.sh --push
variables:
IMAGE_ARCH: stretch
build-image-stretch-tag:
2019-09-17 13:05:36 +00:00
extends:
- .build-docker
stage: image
only:
- tags
script:
- ./scripts/docker-build.sh --push
variables:
IMAGE_ARCH: stretch
# publish jobs
publish-npm:
2019-09-17 13:05:36 +00:00
extends:
- .build-node
stage: publish
only:
- tags
dependencies:
- build-node
script:
- npm publish
# commit status
climate-pending:
stage: status-pre
2019-09-17 13:05:36 +00:00
extends:
- .build-climate
script:
- cc-test-reporter before-build
climate-success:
stage: status-post
2019-09-17 13:05:36 +00:00
extends:
- .build-climate
dependencies:
- build-node
script:
- make upload-climate
codecov-success:
stage: status-post
2019-09-17 13:05:36 +00:00
extends:
- .build-codecov
when: on_success
dependencies:
- build-node
script:
- make upload-codecov
github-pending:
2019-09-17 13:05:36 +00:00
extends:
- .build-curl
stage: status-pre
script:
- ./scripts/github-status.sh pending
github-failure:
2019-09-17 13:05:36 +00:00
extends:
- .build-curl
stage: status-post
when: on_failure
script:
- ./scripts/github-status.sh failure
github-success:
2019-09-17 13:05:36 +00:00
extends:
- .build-curl
stage: status-post
when: on_success
script:
- ./scripts/github-status.sh success