31 lines
820 B
Groovy
31 lines
820 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
git branch: 'main', url: 'https://git.dresi.wtf/dresi/rsyncd-docker.git'
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
script {
|
|
dockerImage = docker.build("dresi/rsyncd-docker:${env.BUILD_NUMBER}")
|
|
}
|
|
}
|
|
}
|
|
stage('Test') {
|
|
steps {
|
|
sh 'docker run --rm dresi/rsyncd-docker:${env.BUILD_NUMBER} date'
|
|
}
|
|
}
|
|
stage('Push') {
|
|
steps {
|
|
script {
|
|
docker.withRegistry('https://harbor.lan/v1/', 'jenkins-harbor') {
|
|
dockerImage.push()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |