api/.gitlab-ci.yml
2021-02-10 22:07:33 +01:00

66 lines
1.1 KiB
YAML

image: registry.gitlab.com/inetmock/ci-image/go
stages:
- test
- build
- release
- deploy
test:
stage: test
script:
- task cli-cover-report
artifacts:
reports:
junit: out/report.xml
cobertura: out/coverage.xml
integration-test:
stage: test
services:
- docker:dind
script:
- task integration-test
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
- goreleaser release --rm-dist
pages:
stage: deploy
image: registry.gitlab.com/inetmock/ci-image/mdbook
only:
refs:
- master
- tags
script:
- mdbook build -d ./../public ./docs
artifacts:
paths:
- public