-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
66 lines (59 loc) · 1.86 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
stages:
- test
- build
- review
- release
include:
- { project: fsrvcorp/templates, file: templates/language/dotnet.yml, ref: 1.0.5 }
- { project: fsrvcorp/templates, file: templates/release/kaniko.yml, ref: 1.0.5 }
- { project: fsrvcorp/templates, file: templates/release/semver.yml, ref: 1.0.5 }
- { project: fsrvcorp/ci-templates, file: kubernetes-review.yaml }
variables:
KUBE_BASE_DIR: "${CI_PROJECT_DIR}/test/IntegrationTest/.kube"
KANIKO_ARGS: --context ${CI_PROJECT_DIR}/src/GitlabChamp --destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA} --destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG} --build-arg REPO_VERSION=${REPO_VERSION}
CONTAINER_FILE_LOCATION: ${CI_PROJECT_DIR}/src/GitlabChamp/Dockerfile
SEMVER_PREFIX: "v"
.dotnet_template_defaults:
stage: test
.kaniko_template_defaults:
stage: build
needs:
- job: pre-kaniko
artifacts: true
.semver_template_defaults:
stage: release
pre-kaniko:
image: alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b
stage: build
before_script:
- apk add git
script:
- echo "REPO_VERSION=$(git describe --tags --always)" > version.env
artifacts:
reports:
dotenv: version.env
review::start:
stage: review
needs:
- job: kaniko-build
artifacts: false
review::stop:
stage: review
integration test:
stage: review
needs:
- job: review::start
artifacts: true
image: debian:sid@sha256:cf7713de1d76390fee3280285fa6d150abb0baf96d40cdc74d14f0c5425dcf90
variables:
TERM: "xterm-256color"
before_script:
- apt-get update >/dev/null && apt-get install -y bats curl >/dev/null
- mkdir -p reports
script:
- bats --formatter tap13 --report-formatter junit ./test/IntegrationTest/*.bats --output reports/ -T
artifacts:
when: always
reports:
junit: reports/*.xml