-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
44 lines (40 loc) · 1.25 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//def kong_harbor = docker.image('oneapi/kong-oneapi:2.8.1-2.4.0');
def kong_harbor = docker.image('oneapi/kong-oneapi:2.8.1-2.6.0');
def kong_azure = docker.image('fusoeca.azurecr.io/kong-oneapi:2.8.1-2.6.0');
pipeline {
options {
timeout(time: 59, unit: 'MINUTES')
}
agent any
stages {
stage('Clone Repository') {
steps {
script {
cleanWs()
deleteDir()
checkout scm
}
}
}
stage("Pull & Push Image") {
steps {
retry(count: 2) {
script {
docker.withRegistry("https://registry.app.corpintra.net") {
kong_harbor.pull();
}
sh 'docker tag registry.app.corpintra.net/oneapi/kong-oneapi:2.8.1-2.6.0 fusoeca.azurecr.io/kong-oneapi:2.8.1-2.6.0'
docker.withRegistry("https://fusoeca.azurecr.io", "fusoeca") {
kong_azure.push()
}
}
}
}
}
}
post {
always {
cleanWs()
}
}
}