redis/Jenkinsfile
lbrinkhaus 0dc0b5c6ad
Some checks failed
continuous-integration/drone/push Build is failing
DragSE Gitea/redis/pipeline/head There was a failure building this commit
continuous-integration/drone Build is passing
Initialize Dockerpath in Jenkinsfile
2022-01-27 00:17:54 +01:00

36 lines
1.0 KiB
Groovy

node {
def app
stage('Initialize'){
def dockerHome = tool 'docker'
env.PATH = "${dockerHome}/bin:${env.PATH}"
}
stage('Clone repository') {
/* Let's make sure we have the repository cloned to our workspace */
checkout scm
}
stage('Build 6.2.6 image') {
/* This builds the actual image; synonymous to
* docker build on the command line */
def dockerfile = "6.2/Dockerfile"
app = docker.build("harbor.dragse.it/base/redis", "-f ${dockerfile} ./6.2 ")
}
stage('Push image') {
/* Finally, we'll push the image with two tags:
* First, the incremental build number from Jenkins
* Second, the 'latest' tag.
* Pushing multiple tags is cheap, as all the layers are reused. */
docker.withRegistry('https://harbor.dragse.it', 'harbor-repo') {
app.push("${env.BUILD_NUMBER}")
app.push("6")
app.push("6.2")
app.push("6.2.6")
app.push("latest")
}
}
}