mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-07 16:12:10 +01:00
Implement docker publishing
This commit is contained in:
committed by
René Pfeuffer
parent
2d8844fde1
commit
a2fd8ff2f1
@@ -77,8 +77,7 @@ task dockerImage(type: DockerBuildImage) {
|
||||
}
|
||||
|
||||
def images() {
|
||||
def version = project.version
|
||||
if (version.contains('-SNAPSHOT')) {
|
||||
if (isSnapshot) {
|
||||
return [
|
||||
"${dockerRepository}:${dockerTag}"
|
||||
]
|
||||
@@ -92,6 +91,17 @@ def images() {
|
||||
}
|
||||
}
|
||||
|
||||
task publish(type: DockerPushImage) {
|
||||
images = images()
|
||||
if (project.hasProperty("dockerUsername") && project.hasProperty("dockerPassword")) {
|
||||
registryCredentials {
|
||||
username = project.property("dockerUsername")
|
||||
password = project.property("dockerPassword")
|
||||
}
|
||||
}
|
||||
dependsOn dockerImage
|
||||
}
|
||||
|
||||
task distribution(type: PackageYaml) {
|
||||
type = 'docker'
|
||||
dependsOn dockerImage
|
||||
|
||||
Reference in New Issue
Block a user