2019-11-02 00:54:48 +00:00
|
|
|
include:
|
|
|
|
- local: /config/gitlab/ci-tools.yml
|
|
|
|
- local: /config/gitlab/ci-rules.yml
|
|
|
|
|
2019-06-16 04:08:12 +00:00
|
|
|
stages:
|
|
|
|
- status-pre
|
|
|
|
- build
|
|
|
|
- image
|
|
|
|
- publish
|
|
|
|
- status-post
|
|
|
|
|
|
|
|
# build jobs
|
|
|
|
build-node:
|
2019-11-02 00:57:54 +00:00
|
|
|
extends:
|
|
|
|
- .build-node
|
2019-06-16 04:08:12 +00:00
|
|
|
stage: build
|
|
|
|
|
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
script:
|
2019-07-01 00:43:35 +00:00
|
|
|
- make clean-target build test
|
2019-06-16 04:08:12 +00:00
|
|
|
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
paths:
|
2019-07-01 00:12:37 +00:00
|
|
|
- out/*.js
|
|
|
|
- out/*.js.map
|
2019-06-16 04:08:12 +00:00
|
|
|
cache:
|
|
|
|
key: "${CI_COMMIT_REF_SLUG}"
|
|
|
|
policy: pull-push
|
|
|
|
paths:
|
|
|
|
- node_modules
|
2019-07-01 00:12:37 +00:00
|
|
|
- out/cache
|
2019-06-16 04:08:12 +00:00
|
|
|
|
2019-10-31 12:34:39 +00:00
|
|
|
build-image-alpine-branch:
|
2019-11-02 00:57:54 +00:00
|
|
|
extends:
|
|
|
|
- .build-docker
|
2019-11-02 00:59:08 +00:00
|
|
|
stage: image
|
2019-07-01 01:36:04 +00:00
|
|
|
except:
|
|
|
|
- tags
|
2019-11-01 23:48:59 +00:00
|
|
|
script:
|
|
|
|
- ./scripts/docker-build.sh --push --default
|
2019-07-01 01:36:04 +00:00
|
|
|
variables:
|
2019-10-30 23:53:44 +00:00
|
|
|
IMAGE_ARCH: alpine
|
2019-07-01 01:36:04 +00:00
|
|
|
|
2019-10-31 12:34:39 +00:00
|
|
|
build-image-alpine-tag:
|
2019-11-02 00:57:54 +00:00
|
|
|
extends:
|
|
|
|
- .build-docker
|
2019-11-02 00:59:08 +00:00
|
|
|
stage: image
|
2019-07-01 01:36:04 +00:00
|
|
|
only:
|
|
|
|
- tags
|
2019-11-01 23:48:59 +00:00
|
|
|
script:
|
|
|
|
- ./scripts/docker-build.sh --push --default
|
2019-10-30 23:53:44 +00:00
|
|
|
variables:
|
|
|
|
IMAGE_ARCH: alpine
|
2019-07-01 01:36:04 +00:00
|
|
|
|
2019-10-30 23:53:44 +00:00
|
|
|
build-image-stretch-branch:
|
2019-11-01 23:59:39 +00:00
|
|
|
extends: [.build-docker]
|
2019-11-02 00:59:08 +00:00
|
|
|
stage: image
|
2019-10-30 23:53:44 +00:00
|
|
|
except:
|
|
|
|
- tags
|
2019-11-01 23:48:59 +00:00
|
|
|
script:
|
|
|
|
- ./scripts/docker-build.sh --push
|
2019-10-30 23:53:44 +00:00
|
|
|
variables:
|
|
|
|
IMAGE_ARCH: stretch
|
|
|
|
|
|
|
|
build-image-stretch-tag:
|
2019-11-02 00:57:54 +00:00
|
|
|
extends:
|
|
|
|
- .build-docker
|
2019-11-02 00:59:08 +00:00
|
|
|
stage: image
|
2019-10-30 23:53:44 +00:00
|
|
|
only:
|
|
|
|
- tags
|
2019-11-01 23:48:59 +00:00
|
|
|
script:
|
|
|
|
- ./scripts/docker-build.sh --push
|
2019-07-01 01:36:04 +00:00
|
|
|
variables:
|
2019-10-30 23:53:44 +00:00
|
|
|
IMAGE_ARCH: stretch
|
2019-06-16 04:08:12 +00:00
|
|
|
|
|
|
|
# publish jobs
|
|
|
|
publish-npm:
|
2019-11-02 00:57:54 +00:00
|
|
|
extends:
|
|
|
|
- .build-node
|
2019-06-16 04:08:12 +00:00
|
|
|
stage: publish
|
|
|
|
only:
|
|
|
|
- tags
|
|
|
|
|
|
|
|
dependencies:
|
|
|
|
- build-node
|
|
|
|
script:
|
|
|
|
- npm publish
|
|
|
|
|
|
|
|
# commit status
|
2019-11-01 23:48:59 +00:00
|
|
|
climate-pending:
|
|
|
|
stage: status-pre
|
|
|
|
extends:
|
|
|
|
- .build-climate
|
|
|
|
|
|
|
|
script:
|
|
|
|
- cc-test-reporter before-build
|
|
|
|
|
|
|
|
climate-success:
|
|
|
|
stage: status-post
|
|
|
|
extends:
|
|
|
|
- .build-climate
|
|
|
|
|
|
|
|
dependencies:
|
|
|
|
- build-node
|
|
|
|
script:
|
|
|
|
- make upload-climate
|
|
|
|
|
|
|
|
codecov-success:
|
|
|
|
stage: status-post
|
|
|
|
extends:
|
|
|
|
- .build-codecov
|
|
|
|
|
|
|
|
when: on_success
|
|
|
|
dependencies:
|
|
|
|
- build-node
|
|
|
|
script:
|
|
|
|
- make upload-codecov
|
|
|
|
|
2019-06-16 04:08:12 +00:00
|
|
|
github-pending:
|
2019-11-01 23:59:39 +00:00
|
|
|
extends:
|
|
|
|
- .build-curl
|
2019-06-16 04:08:12 +00:00
|
|
|
stage: status-pre
|
|
|
|
script:
|
|
|
|
- ./scripts/github-status.sh pending
|
|
|
|
|
|
|
|
github-failure:
|
2019-11-01 23:59:39 +00:00
|
|
|
extends:
|
|
|
|
- .build-curl
|
2019-06-16 04:08:12 +00:00
|
|
|
stage: status-post
|
|
|
|
when: on_failure
|
|
|
|
script:
|
|
|
|
- ./scripts/github-status.sh failure
|
|
|
|
|
|
|
|
github-success:
|
2019-11-01 23:59:39 +00:00
|
|
|
extends:
|
|
|
|
- .build-curl
|
2019-06-16 04:08:12 +00:00
|
|
|
stage: status-post
|
|
|
|
when: on_success
|
|
|
|
script:
|
|
|
|
- ./scripts/github-status.sh success
|