-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
47 lines (40 loc) · 1.2 KB
/
build.gradle
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
plugins {
id "com.palantir.docker" version "0.22.1"
id "com.palantir.docker-run" version "0.22.1"
}
group 'base.images.debian.11-bullseye.mandrel.22-2.java.17'
docker {
def host = System.getenv('DOCKER_HUB_HOST')
def destination = version.endsWith('SNAPSHOT') ? 'snapshots/' : ''
def coordinates = "${host}/${destination}${project.group}.${project.name}"
name "${coordinates}:${project.version}"
tag "${host}", "${coordinates}:latest"
copySpec.from("scripts").into("scripts")
}
dockerRun {
def host = System.getenv('DOCKER_HUB_HOST')
def destination = version.endsWith('SNAPSHOT') ? 'snapshots/' : ''
def coordinates = "${host}/${destination}${project.group}.${project.name}"
name "${project.name}-${project.version}"
image "${coordinates}:${project.version}"
clean true
}
tag {
// Now you can specify the message via the environment variable tagMessage
message fromEnvironmentVariable('tagMessage')
}
task rootProjectGroupRaw {
doLast {
println(rootProject.group)
}
}
task rootProjectNameRaw {
doLast {
println(rootProject.name)
}
}
task rootProjectVersionRaw {
doLast {
println(rootProject.version)
}
}