2021-02-10 20:26:45 +00:00
|
|
|
image: registry.gitlab.com/inetmock/ci-image/go
|
2020-12-26 13:11:49 +00:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- build
|
|
|
|
- release
|
|
|
|
|
|
|
|
test:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- task cli-cover-report
|
2020-12-27 11:16:06 +00:00
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
junit: out/report.xml
|
|
|
|
cobertura: out/coverage.xml
|
2020-12-26 13:11:49 +00:00
|
|
|
|
2021-02-10 20:26:45 +00:00
|
|
|
integration-test:
|
|
|
|
stage: test
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
script:
|
|
|
|
- task integration-test
|
|
|
|
|
2020-12-26 13:11:49 +00:00
|
|
|
lint:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- golangci-lint run
|
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
snapshot-release:
|
|
|
|
stage: build
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
before_script:
|
|
|
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
|
|
|
script:
|
|
|
|
- task snapshot-release
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
|
|
|
|
release:
|
|
|
|
stage: release
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
only:
|
|
|
|
- tags
|
|
|
|
variables:
|
|
|
|
GIT_DEPTH: 0
|
|
|
|
script:
|
|
|
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
2021-01-04 16:21:03 +00:00
|
|
|
- goreleaser release --rm-dist
|
2021-02-10 20:26:45 +00:00
|
|
|
|
|
|
|
docs:
|
|
|
|
stage: release
|
|
|
|
image: registry.gitlab.com/inetmock/ci-image/mdbook
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- tags
|
|
|
|
script:
|
|
|
|
- mdbook build -d ./../public ./docs
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|