pflaenz.li/Jenkinsfile

30 lines
734 B
Plaintext
Raw Normal View History

2023-04-07 10:58:28 +02:00
pipeline {
agent any
stages {
stage('Pull git') {
2023-04-07 11:02:28 +02:00
steps {
checkout scm
}
2023-04-07 10:58:28 +02:00
}
stage('Build Docker Image') {
steps {
script {
2023-04-07 11:11:17 +02:00
def dockerImage = docker.build('pflaenzli', '-f Dockerfile . --tag pflaenzli:latest')
2023-04-07 10:58:28 +02:00
}
}
}
stage('Push Docker Image') {
steps {
script {
2023-04-07 11:11:47 +02:00
def dockerImage = docker.image('pflaenzli:latest')
2023-04-07 10:58:28 +02:00
docker.withRegistry('https://git.thisfro.ch', 'jenkins-ci') {
dockerImage.push()
}
}
}
}
}
}