push image
Gitea/docker-s3www/pipeline/head This commit looks good
Details
Gitea/docker-s3www/pipeline/head This commit looks good
Details
parent
b64e114b73
commit
ff2199750f
|
@ -1,3 +1,5 @@
|
|||
def image_name = "dpedu/s3www"
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
kubernetes {
|
||||
|
@ -18,19 +20,29 @@ spec:
|
|||
}
|
||||
}
|
||||
stages {
|
||||
stage("Build iamge") {
|
||||
stage("Build image") {
|
||||
steps {
|
||||
container("docker") {
|
||||
script {
|
||||
def image
|
||||
try {
|
||||
image = docker.image("dockermirror:5000/dpedu/nagdebbuilder-${distro}")
|
||||
image.pull() // Pull a recent version to share base layers with (?)
|
||||
docker.withRegistry('http://dockermirror:5000') {
|
||||
docker.image(image_name).pull() // Pull a recent version to share base layers with (?)
|
||||
}
|
||||
} catch (exc) {
|
||||
echo "couldn't pull image, assuming we're building it for the first time"
|
||||
image = docker.build("dockermirror:5000/dpedu/s3www",)
|
||||
}
|
||||
// image.push()
|
||||
docker.build(image_name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("Push image") {
|
||||
steps {
|
||||
container("docker") {
|
||||
script {
|
||||
docker.withRegistry('http://dockermirror:5000') {
|
||||
docker.image(image_name).push("latest")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue