minecraft-pi-docker/Jenkinsfile

38 lines
1.4 KiB
Plaintext
Raw Normal View History

2020-09-26 19:48:47 -04:00
pipeline {
2021-06-17 17:32:24 -04:00
agent none
2020-09-26 19:48:47 -04:00
stages {
2022-07-15 17:54:43 -04:00
stage('Debian Buster') {
2021-06-17 17:32:24 -04:00
agent {
2022-03-11 20:39:00 -05:00
dockerfile {
2022-03-09 22:53:37 -05:00
filename 'scripts/ci/Dockerfile'
2022-07-15 19:43:26 -04:00
args '-v /var/run/docker.sock:/var/run/docker.sock --network host'
2021-06-17 17:32:24 -04:00
}
2020-09-26 19:48:47 -04:00
}
2021-06-21 13:26:55 -04:00
stages {
stage('Build') {
steps {
sh './scripts/ci/run.sh'
}
post {
success {
2022-03-09 21:23:41 -05:00
archiveArtifacts artifacts: 'out/*.AppImage*', fingerprint: true
2021-06-21 13:26:55 -04:00
}
}
}
stage('Publish') {
steps {
sh 'apt-get update && apt-get install -y docker.io'
2022-06-25 23:40:24 -04:00
sh 'rm -rf ./out/server-amd64'
sh './scripts/build.sh server amd64'
2021-06-21 13:26:55 -04:00
sh 'docker build --no-cache --tag thebrokenrail/minecraft-pi-reborn-server .'
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-reborn-server'
}
2020-09-26 19:48:47 -04:00
}
}
}
}
}