Added Jenkins multiarch docker build
This commit is contained in:
parent
83b66a572d
commit
3dc0d73d65
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
@ -1,18 +1,15 @@
|
|||||||
|
|
||||||
node {
|
node {
|
||||||
def app
|
environment{
|
||||||
stage('Clone repository') {
|
IMAGENAME = "agreiner/advancedmqttbridge"
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Clone repository') {
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
stage('Build image') {
|
stage('Build multiarch image') {
|
||||||
|
sh """
|
||||||
app = docker.build("agreiner/advancedmqttbridge")
|
docker buildx build -t reg.greinet.com/agreiner/advancedmqttbridge:latest --platform linux/amd64,linux/arm64,linux/ppc64le --push .
|
||||||
}
|
"""
|
||||||
stage('Push image') {
|
|
||||||
docker.withRegistry('https://reg.greinet.com', 'docker_registry_jenkins') {
|
|
||||||
app.push("1.${env.BUILD_NUMBER}")
|
|
||||||
app.push("latest")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user