Update Jenkinsfile
This commit is contained in:
parent
53f5aec90c
commit
7b99ead0eb
45
Jenkinsfile
vendored
45
Jenkinsfile
vendored
@ -1,30 +1,33 @@
|
|||||||
node {
|
node {
|
||||||
def app
|
def app
|
||||||
|
agent any
|
||||||
|
|
||||||
stage('Clone repository') {
|
stages {
|
||||||
/* Let's make sure we have the repository cloned to our workspace */
|
stage('Clone repository') {
|
||||||
|
/* Let's make sure we have the repository cloned to our workspace */
|
||||||
|
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build 6.2.6 image') {
|
stage('Build 6.2.6 image') {
|
||||||
/* This builds the actual image; synonymous to
|
/* This builds the actual image; synonymous to
|
||||||
* docker build on the command line */
|
* docker build on the command line */
|
||||||
def dockerfile = "6.2/Dockerfile"
|
def dockerfile = "6.2/Dockerfile"
|
||||||
app = docker.build("harbor.dragse.it/base/redis", "-f ${dockerfile} ./6.2 ")
|
app = docker.build("harbor.dragse.it/base/redis", "-f ${dockerfile} ./6.2 ")
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Push image') {
|
stage('Push image') {
|
||||||
/* Finally, we'll push the image with two tags:
|
/* Finally, we'll push the image with two tags:
|
||||||
* First, the incremental build number from Jenkins
|
* First, the incremental build number from Jenkins
|
||||||
* Second, the 'latest' tag.
|
* Second, the 'latest' tag.
|
||||||
* Pushing multiple tags is cheap, as all the layers are reused. */
|
* Pushing multiple tags is cheap, as all the layers are reused. */
|
||||||
docker.withRegistry('https://harbor.dragse.it', 'harbor-repo') {
|
docker.withRegistry('https://harbor.dragse.it', 'harbor-repo') {
|
||||||
app.push("${env.BUILD_NUMBER}")
|
app.push("${env.BUILD_NUMBER}")
|
||||||
app.push("6")
|
app.push("6")
|
||||||
app.push("6.2")
|
app.push("6.2")
|
||||||
app.push("6.2.6")
|
app.push("6.2.6")
|
||||||
app.push("latest")
|
app.push("latest")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user