-
Notifications
You must be signed in to change notification settings - Fork 50
/
batect.yml
89 lines (79 loc) · 2.98 KB
/
batect.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
77
78
79
80
81
82
83
84
85
86
87
88
89
project_name: kaml
containers:
build-env:
image: openjdk:18.0.2-jdk-buster@sha256:5b68719b53ace41eec2f0089ada5245c8fff72adac356a2cb2f94e0b4338a0b4
volumes:
- local: .
container: /code
options: cached
- type: cache
name: gradle-cache
container: /home/container-user/.gradle
working_directory: /code
environment:
GRADLE_OPTS: -Dorg.gradle.daemon=false
run_as_current_user:
enabled: true
home_directory: /home/container-user
tasks:
build:
description: Build the library.
run:
container: build-env
command: ./gradlew assemble
check:
description: Run the unit tests and static analysis tools.
run:
container: build-env
command: ./gradlew check
continuousCheck:
description: Run 'check' and then re-run when any code changes are detected.
run:
container: build-env
command: ./gradlew --continuous check
spotlessApply:
description: Fix code formatting issues identified by Spotless.
run:
container: build-env
command: ./gradlew spotlessApply
shell:
description: Start a shell in the development environment.
run:
container: build-env
command: bash
generateCodeCoverageReport:
description: Generate a code coverage report based on a previous test run.
run:
container: build-env
command: ./gradlew jacocoTestReport
publishRelease:
description: Publish the library to Sonatype's Open Source Software Repository Hosting (OSSRH), which will be synced to Maven Central.
run:
container: build-env
command: ./gradlew publishRelease
environment:
OSSRH_USERNAME: $OSSRH_USERNAME
OSSRH_PASSWORD: $OSSRH_PASSWORD
GPG_KEY_ID: $GPG_KEY_ID # Run `gpg -K` to get this, take last eight characters
GPG_KEY_RING: $GPG_KEY_RING # Run `gpg --export-secret-keys "<key user name goes here>" | base64` to get this
GPG_KEY_PASSPHRASE: $GPG_KEY_PASSPHRASE
publishSnapshot:
description: Publish the library to Sonatype's Open Source Software Repository Hosting (OSSRH), which will be synced to Maven Central.
run:
container: build-env
command: ./gradlew publishSnapshot
environment:
OSSRH_USERNAME: $OSSRH_USERNAME
OSSRH_PASSWORD: $OSSRH_PASSWORD
GPG_KEY_ID: $GPG_KEY_ID # Run `gpg -K` to get this, take last eight characters
GPG_KEY_RING: $GPG_KEY_RING # Run `gpg --export-secret-keys "<key user name goes here>" | base64` to get this
GPG_KEY_PASSPHRASE: $GPG_KEY_PASSPHRASE
assembleRelease:
description: Assemble the files that would be published to a repository.
run:
container: build-env
command: ./gradlew assembleRelease
environment:
GPG_KEY_ID: $GPG_KEY_ID # Run `gpg -K` to get this, take last eight characters
GPG_KEY_RING: $GPG_KEY_RING # Run `gpg --export-secret-keys "<key user name goes here>" | base64` to get this
GPG_KEY_PASSPHRASE: $GPG_KEY_PASSPHRASE