1
0
Fork 0
mirror of https://github.com/parrazam/radicale-docker.git synced 2024-11-22 01:53:24 +01:00

Removed 386 image from Jenkinsfile

This commit is contained in:
Parra 2022-02-27 20:29:33 +01:00
parent 5839145583
commit 3f692d3530

25
Jenkinsfile vendored
View file

@ -35,7 +35,7 @@ pipeline {
axes {
axis {
name 'PLATFORM'
values 'linux/amd64', 'linux/arm64', 'linux/arm', 'linux/386'
values 'linux/amd64', 'linux/arm64', 'linux/arm'
}
}
stages {
@ -48,10 +48,10 @@ pipeline {
script {
stage("Build ${PLATFORM}") {
script {
SOURCE_IMAGE = SOURCE+':'+PLATFORM.tokenize('/')[1]
SOURCE_IMAGE = SOURCE
TARGET_IMAGE = TARGET+':'+PLATFORM.tokenize('/')[1]
if (env.BRANCH_NAME.startsWith('release/')) {
SOURCE_IMAGE += "." + VERSION
SOURCE_IMAGE += ":" + VERSION
TARGET_IMAGE += "." + VERSION
} else {
TARGET_IMAGE += VERSION
@ -68,20 +68,6 @@ pipeline {
}
}
stage('Publish images to Docker Hub') {
when {
anyOf {
branch "${MASTER_BRANCH}"
branch "${RELEASE_BRANCH}"
}
}
steps {
withCredentials([usernamePassword(credentialsId: 'dockerHub', passwordVariable: 'dockerHubPassword', usernameVariable: 'dockerHubUser')]) {
sh "echo ${env.dockerHubPassword} | docker login -u ${env.dockerHubUser} --password-stdin"
sh "docker image push --all-tags ${TARGET}"
}
}
}
stage('Tagging with common version') {
environment {
GROUPED_VERSION = "${VERSION}"
}
@ -100,16 +86,19 @@ pipeline {
VERSION = '.' + (env.BRANCH_NAME).tokenize('/')[1]
}
IMAGES = ''
for (ARCH in ['linux/amd64', 'linux/arm64', 'linux/arm', 'linux/386']) {
for (ARCH in ['linux/amd64', 'linux/arm64', 'linux/arm']) {
IMAGES += ' -a ' + TARGET + ':' + ARCH.tokenize('/')[1] + VERSION
}
}
echo "${IMAGES}"
withCredentials([usernamePassword(credentialsId: 'dockerHub', passwordVariable: 'dockerHubPassword', usernameVariable: 'dockerHubUser')]) {
sh "echo ${env.dockerHubPassword} | docker login -u ${env.dockerHubUser} --password-stdin"
sh "docker manifest create ${TARGET}:${GROUPED_VERSION} ${IMAGES}"
sh "docker manifest push ${TARGET}:${GROUPED_VERSION}"
}
}
}
}
post {
always {