Replace all single quotes

This commit is contained in:
Jannis Portmann 2023-04-18 17:25:42 +02:00
parent 8715f9e38c
commit 29ecee0a20

15
Jenkinsfile vendored
View file

@ -2,31 +2,30 @@ pipeline {
agent any agent any
stages { stages {
stage('Pull git') { stage("Pull git") {
steps { steps {
checkout scm checkout scm
} }
} }
stage('Build Docker Image') { stage("Build Docker Image") {
steps { steps {
script { script {
def dockerImage = docker.build('git.thisfro.ch/jenkinsci/pflaenzli', '-f Dockerfile . --tag git.thisfro.ch/jenkinsci/pflaenzli:${BUILD_NUMBER} --tag git.thisfro.ch/jenkinsci/pflaenzli:latest') def dockerImage = docker.build("git.thisfro.ch/jenkinsci/pflaenzli", "-f Dockerfile . --tag git.thisfro.ch/jenkinsci/pflaenzli:${BUILD_NUMBER} --tag git.thisfro.ch/jenkinsci/pflaenzli:latest")
} }
} }
} }
stage('Push Docker Image') { stage("Push Docker Image") {
steps { steps {
script { script {
sh 'echo "git.thisfro.ch/jenkinsci/pflaenzli:${BUILD_NUMBER}"'
def numberTagImage = docker.image("git.thisfro.ch/jenkinsci/pflaenzli:${BUILD_NUMBER}") def numberTagImage = docker.image("git.thisfro.ch/jenkinsci/pflaenzli:${BUILD_NUMBER}")
docker.withRegistry('https://git.thisfro.ch', 'jenkins-ci') { docker.withRegistry("https://git.thisfro.ch", "jenkins-ci") {
numberTagImage.push() numberTagImage.push()
} }
def latestTagImage = docker.image('git.thisfro.ch/jenkinsci/pflaenzli:latest') def latestTagImage = docker.image("git.thisfro.ch/jenkinsci/pflaenzli:latest")
docker.withRegistry('https://git.thisfro.ch', 'jenkins-ci') { docker.withRegistry("https://git.thisfro.ch", "jenkins-ci") {
latestTagImage.push() latestTagImage.push()
} }
} }