-
Notifications
You must be signed in to change notification settings - Fork 29
/
Jenkinsfile
68 lines (66 loc) · 2.48 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
pipeline {
agent {
docker {
image 'docker:20'
}
}
triggers {
cron('@daily')
}
environment {
PROJECT_NAME = 'idempiereofficial/idempiere'
DOCKERHUB = credentials('idempiereofficial-dockerhub')
}
stages {
stage('Login into dockerhub') {
steps {
sh 'docker login -u $DOCKERHUB_USR -p $DOCKERHUB_PSW'
}
}
stage('Publishing 9-release to dockerhub') {
steps {
sh 'docker image rm -f $PROJECT_NAME:9'
sh 'docker build --no-cache -t $PROJECT_NAME:release -t $PROJECT_NAME:9 ./9'
sh 'docker push $PROJECT_NAME:release'
sh 'docker push $PROJECT_NAME:9'
}
}
stage('Publishing 9-daily to dockerhub') {
steps {
sh 'docker image rm -f $PROJECT_NAME:9-daily'
sh 'docker build --no-cache -t $PROJECT_NAME:daily -t $PROJECT_NAME:9-daily ./9-daily'
sh 'docker push $PROJECT_NAME:9-daily'
sh 'docker push $PROJECT_NAME:9-daily'
}
}
stage('Publishing 9-master to dockerhub') {
steps {
sh 'docker image rm -f $PROJECT_NAME:9-master'
sh 'docker build --no-cache -t $PROJECT_NAME:latest -t $PROJECT_NAME:9-master ./9-master'
sh 'docker push $PROJECT_NAME:9-master'
}
}
stage('Publishing 8.2 to dockerhub') {
steps {
sh 'docker image rm -f $PROJECT_NAME:8.2'
sh 'docker build --no-cache -t $PROJECT_NAME:8.2 -t $PROJECT_NAME:phong ./8.2'
sh 'docker push $PROJECT_NAME:8.2'
sh 'docker push $PROJECT_NAME:phong'
}
}
stage('Publishing source-release-9 to dockerhub') {
steps {
sh 'docker image rm -f $PROJECT_NAME:source-release-9'
sh 'docker build --no-cache -t $PROJECT_NAME:source-release-9 ./source-release-9'
sh 'docker push $PROJECT_NAME:source-release-9'
}
}
stage('Publishing source-release-8.2 to dockerhub') {
steps {
sh 'docker image rm -f $PROJECT_NAME:source-release-8.2'
sh 'docker build --no-cache -t $PROJECT_NAME:source-release-8.2 ./source-release-8.2'
sh 'docker push $PROJECT_NAME:source-release-8.2'
}
}
}
}