30 lines
No EOL
752 B
Groovy
30 lines
No EOL
752 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('Pull git') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
|
|
stage('Build Docker Image') {
|
|
steps {
|
|
script {
|
|
def dockerImage = docker.build('pflaenzli', '-f Dockerfile . --tag pflaenzli:latest')
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Push Docker Image') {
|
|
steps {
|
|
script {
|
|
def dockerImage = def dockerImage = docker.image('pflaenzli:latest')
|
|
docker.withRegistry('https://git.thisfro.ch', 'jenkins-ci') {
|
|
dockerImage.push()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |