minecraft-pi-reborn/Jenkinsfile

39 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-09-26 23:48:47 +00:00
pipeline {
agent {
dockerfile {
filename 'Dockerfile.build'
args '-v /var/run/docker.sock:/var/run/docker.sock'
}
}
stages {
stage('Install QEMU') {
steps {
sh 'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes'
}
}
stage('Build') {
steps {
2020-10-01 15:08:46 +00:00
sh 'DOCKER_BUILD_OPTIONS="--no-cache" ./scripts/build.sh'
2020-09-26 23:48:47 +00:00
}
}
stage('Publish') {
steps {
withCredentials([usernamePassword(credentialsId: 'docker_hub_login', usernameVariable: 'DOCKER_HUB_USERNAME', passwordVariable: 'DOCKER_HUB_PASSWORD')]) {
sh 'docker login -u "${DOCKER_HUB_USERNAME}" -p "${DOCKER_HUB_PASSWORD}"'
}
sh 'docker push thebrokenrail/minecraft-pi'
}
}
2020-09-27 00:48:46 +00:00
stage('Package') {
steps {
sh './scripts/package.sh'
}
post {
success {
2020-10-05 22:17:55 +00:00
archiveArtifacts artifacts: 'out/**', fingerprint: true
2020-09-27 00:48:46 +00:00
}
}
}
2020-09-26 23:48:47 +00:00
}
}