-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
37 lines (35 loc) · 1.18 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
pipeline {
agent any
environment {
gitLabel = VersionNumber([
projectStartDate: '2023-01-01',
versionNumberString: "${params.gitLabel}",
worstResultForIncrement: 'SUCCESS'
])
}
stages {
stage('Docker:latest') {
steps {
script {
currentBuild.displayName = "${params.gitLabel}"
}
sh "docker build --build-arg debug_mode=--no-dev -t rmamba/letsproxy:api ."
sh "docker push rmamba/letsproxy:api"
}
}
stage('Docker:14-alpine') {
steps {
sh "docker tag rmamba/letsproxy:api rmamba/letsproxy:14-alpine"
sh "docker push rmamba/letsproxy:14-alpine"
sh "docker rmi rmamba/letsproxy:14-alpine"
}
}
stage('Docker:tag') {
steps {
sh "docker tag rmamba/letsproxy:api rmamba/letsproxy:14-alpine-${params.gitLabel}"
sh "docker push rmamba/letsproxy:14-alpine-${params.gitLabel}"
sh "docker rmi rmamba/letsproxy:14-alpine-${params.gitLabel}"
}
}
}
}