1
0
Fork 0
salty-dog/.gitlab-ci.yml

134 lines
2.1 KiB
YAML
Raw Normal View History

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:
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:
- 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
- out/cache
2019-06-16 04:08:12 +00:00
2019-10-31 12:34:39 +00:00
build-image-alpine-branch:
extends: [.build-docker]
2019-07-01 01:36:04 +00:00
except:
- tags
script:
- ./scripts/docker-build.sh --push --default
2019-07-01 01:36:04 +00:00
variables:
IMAGE_ARCH: alpine
2019-07-01 01:36:04 +00:00
2019-10-31 12:34:39 +00:00
build-image-alpine-tag:
extends: [.build-docker]
2019-07-01 01:36:04 +00:00
only:
- tags
script:
- ./scripts/docker-build.sh --push --default
variables:
IMAGE_ARCH: alpine
2019-07-01 01:36:04 +00:00
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
2019-07-01 01:36:04 +00:00
variables:
IMAGE_ARCH: stretch
2019-06-16 04:08:12 +00:00
# publish jobs
publish-npm:
extends: [.build-node]
2019-06-16 04:08:12 +00:00
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
2019-06-16 04:08:12 +00:00
github-pending:
extends:
- .build-curl
2019-06-16 04:08:12 +00:00
stage: status-pre
script:
- ./scripts/github-status.sh pending
github-failure:
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:
extends:
- .build-curl
2019-06-16 04:08:12 +00:00
stage: status-post
when: on_success
script:
- ./scripts/github-status.sh success