-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
76 lines (67 loc) · 1.82 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
67
68
69
70
71
72
73
74
75
76
include:
- project: 'AgileFactory/Witboost.Mesh/witboost.Mesh.CI'
ref: 'main'
file: 'common/witboost.helm.gitlab-ci.yml'
image: sbtscala/scala-sbt:eclipse-temurin-jammy-17.0.9_9_1.9.7_2.13.12
stages:
- setup
- check
- test
- publish
variables:
SBT_OPTS: "-Dsbt.global.base=sbt-cache/sbtboot -Dsbt.boot.directory=sbt-cache/boot -Dsbt.ivy.home=sbt-cache/ivy -Dsbt.ci=true -Dmockserver.logLevel=OFF"
cache:
untracked: true
paths:
- "sbt-cache/ivy/cache"
- "sbt-cache/boot"
- "sbt-cache/sbtboot"
setup:
stage: setup
extends: .witboost.helm.base-job
cache: []
before_script: []
script:
- !reference [.witboost.helm.clone-scripts, script]
- !reference [.witboost.helm.get-version, script]
- echo "VERSION=${VERSION}" >> vars.env
artifacts:
reports:
dotenv: vars.env
check:
stage: check
script:
- sbt scalafmtSbtCheck scalafmtCheckAll ${SBT_OPTS}
test:
stage: test
script:
- sbt -mem 2048 clean coverage test coverageAggregate ${SBT_OPTS}
coverage: '/Statement coverage[A-Za-z\.*]\s*:\s*([^%]+)/'
artifacts:
paths:
- target/scala-2.13/scoverage-report/*
- target/scala-2.13/coverage-report/*
reports:
coverage_report:
coverage_format: cobertura
path: target/scala-2.13/coverage-report/cobertura.xml
publish:
stage: publish
script:
- export ARTIFACT_VERSION=${VERSION}
- sbt k8tyGitlabCIPublish ${SBT_OPTS}
only:
- master
- tags
- /(^release\/([0-9]+)\.([0-9]+))/
publishCentral:
stage: publish
before_script:
- apt-get update
- apt-get install gnupg -y
script:
- echo -n "$MAVEN_GPG_KEY" | base64 -d | gpg --batch --import
- export ARTIFACT_VERSION=${VERSION}
- sbt publishSigned sonatypeCentralUpload # TODO sonatypeCentralRelease would automatically release it
only:
- tags