136 lines
2.1 KiB
YAML
136 lines
2.1 KiB
YAML
stages:
|
|
- status-pre
|
|
- build
|
|
- image
|
|
- publish
|
|
- status-post
|
|
|
|
# template jobs
|
|
|
|
.branch-deploy: &branch-deploy
|
|
only:
|
|
- master
|
|
|
|
# build jobs
|
|
build-node:
|
|
extends: [.build-node]
|
|
stage: build
|
|
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
script:
|
|
- make clean-target build test
|
|
|
|
artifacts:
|
|
expire_in: 1 week
|
|
paths:
|
|
- out/*.js
|
|
- out/*.js.map
|
|
cache:
|
|
key: "${CI_COMMIT_REF_SLUG}"
|
|
policy: pull-push
|
|
paths:
|
|
- node_modules
|
|
- out/cache
|
|
|
|
build-image-alpine-branch:
|
|
extends: [.build-docker]
|
|
except:
|
|
- tags
|
|
script:
|
|
- ./scripts/docker-build.sh --push --default
|
|
variables:
|
|
IMAGE_ARCH: alpine
|
|
|
|
build-image-alpine-tag:
|
|
extends: [.build-docker]
|
|
only:
|
|
- tags
|
|
script:
|
|
- ./scripts/docker-build.sh --push --default
|
|
variables:
|
|
IMAGE_ARCH: alpine
|
|
|
|
build-image-stretch-branch:
|
|
extends: [.build-docker]
|
|
except:
|
|
- tags
|
|
script:
|
|
- ./scripts/docker-build.sh --push
|
|
variables:
|
|
IMAGE_ARCH: stretch
|
|
|
|
build-image-stretch-tag:
|
|
extends: [.build-docker]
|
|
only:
|
|
- tags
|
|
script:
|
|
- ./scripts/docker-build.sh --push
|
|
variables:
|
|
IMAGE_ARCH: stretch
|
|
|
|
# publish jobs
|
|
publish-npm:
|
|
extends: [.build-node]
|
|
stage: publish
|
|
only:
|
|
- tags
|
|
|
|
dependencies:
|
|
- build-node
|
|
script:
|
|
- npm publish
|
|
|
|
# commit status
|
|
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
|
|
|
|
github-pending:
|
|
extends:
|
|
- .build-curl
|
|
stage: status-pre
|
|
script:
|
|
- ./scripts/github-status.sh pending
|
|
|
|
github-failure:
|
|
extends:
|
|
- .build-curl
|
|
stage: status-post
|
|
when: on_failure
|
|
script:
|
|
- ./scripts/github-status.sh failure
|
|
|
|
github-success:
|
|
extends:
|
|
- .build-curl
|
|
stage: status-post
|
|
when: on_success
|
|
script:
|
|
- ./scripts/github-status.sh success
|