parent
ae3941707a
commit
c8b85b882d
4 changed files with 44 additions and 12 deletions
|
|
@ -57,6 +57,10 @@ task buildImage(type: Exec) {
|
|||
task tagLatestImage(type: Exec) {
|
||||
dependsOn buildImage
|
||||
|
||||
enabled = !project.version.contains("SNAPSHOT")
|
||||
&& !project.version.contains("alpha") \
|
||||
&& !project.version.contains("beta") \
|
||||
|
||||
commandLine 'podman', 'tag', "${project.name}:${project.version}",\
|
||||
"${project.name}:latest"
|
||||
}
|
||||
|
|
@ -78,20 +82,30 @@ task pushImage(type: Exec) {
|
|||
task pushLatestImage(type: Exec) {
|
||||
dependsOn buildLatestImage
|
||||
|
||||
enabled = !project.version.contains("SNAPSHOT")
|
||||
&& !project.version.contains("alpha") \
|
||||
&& !project.version.contains("beta") \
|
||||
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
+ "/${project.name}:latest"
|
||||
}
|
||||
|
||||
task pushForTest {
|
||||
dependsOn pushImage
|
||||
dependsOn pushLatestImage
|
||||
task pushForTest(type: Exec) {
|
||||
dependsOn buildImage
|
||||
|
||||
commandLine 'podman', 'push', '--tls-verify=false', \
|
||||
"localhost/${project.name}:${project.version}", \
|
||||
"${project.rootProject.properties['docker.registry']}" \
|
||||
+ "/${project.name}:test"
|
||||
}
|
||||
|
||||
task pushImages {
|
||||
// Don't push without testing first
|
||||
dependsOn test
|
||||
dependsOn pushForTest
|
||||
dependsOn pushImage
|
||||
dependsOn pushLatestImage
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue