Skip to content

Commit 2a881f0

Browse files
authored
Merge pull request #59 from overture-stack/rc/2.7.0
Rc/2.7.0
2 parents 992d215 + fc8b76c commit 2a881f0

File tree

2 files changed

+37
-15
lines changed

2 files changed

+37
-15
lines changed

Jenkinsfile

+36-14
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import groovy.json.JsonOutput
22

33
def version = "UNKNOWN"
44
def commit = "UNKNOWN"
5+
def dockerHubRepo = "overture/rollcall"
6+
def gitHubRegistry = "ghcr.io"
7+
def gitHubRepo = "overture-stack/rollcall"
58

69
pipeline {
710
agent {
@@ -26,21 +29,22 @@ spec:
2629
- name: docker
2730
image: docker:18-git
2831
tty: true
29-
volumeMounts:
30-
- mountPath: /var/run/docker.sock
31-
name: docker-sock
32+
env:
33+
- name: DOCKER_HOST
34+
value: tcp://localhost:2375
35+
- name: HOME
36+
value: /home/jenkins/agent
3237
- name: dind-daemon
3338
image: docker:18.06-dind
3439
securityContext:
3540
privileged: true
41+
runAsUser: 0
3642
volumeMounts:
3743
- name: docker-graph-storage
3844
mountPath: /var/lib/docker
45+
securityContext:
46+
runAsUser: 1000
3947
volumes:
40-
- name: docker-sock
41-
hostPath:
42-
path: /var/run/docker.sock
43-
type: File
4448
- name: docker-graph-storage
4549
emptyDir: {}
4650
"""
@@ -73,10 +77,19 @@ spec:
7377
withCredentials([usernamePassword(credentialsId:'OvertureDockerHub', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
7478
sh 'docker login -u $USERNAME -p $PASSWORD'
7579
}
76-
sh "docker build --network=host -f Dockerfile . -t overture/rollcall:edge -t overture/rollcall:${commit}"
77-
sh "docker push overture/rollcall:edge"
78-
sh "docker push overture/rollcall:${commit}"
80+
sh "docker build --network=host -f Dockerfile . -t ${dockerHubRepo}:edge -t ${dockerHubRepo}:${commit}"
81+
sh "docker push ${dockerHubRepo}:edge"
82+
sh "docker push ${dockerHubRepo}:${commit}"
83+
}
84+
container('docker') {
85+
withCredentials([usernamePassword(credentialsId:'OvertureBioGithub', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
86+
sh "docker login ${gitHubRegistry} -u $USERNAME -p $PASSWORD"
87+
}
88+
sh "docker build --network=host -f Dockerfile . -t ${gitHubRegistry}/${gitHubRepo}:edge -t ${gitHubRegistry}/${gitHubRepo}:${commit}"
89+
sh "docker push ${gitHubRegistry}/${gitHubRepo}:edge"
90+
sh "docker push ${gitHubRegistry}/${gitHubRepo}:${commit}"
7991
}
92+
8093
}
8194
}
8295
stage('Release & tag') {
@@ -87,15 +100,24 @@ spec:
87100
container('docker') {
88101
withCredentials([usernamePassword(credentialsId: 'OvertureBioGithub', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
89102
sh "git tag ${version}"
90-
sh "git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/overture-stack/rollcall --tags"
103+
sh "git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/${gitHubRepo} --tags"
91104
}
92105
withCredentials([usernamePassword(credentialsId:'OvertureDockerHub', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
93106
sh 'docker login -u $USERNAME -p $PASSWORD'
94107
}
95-
sh "docker build --network=host -f Dockerfile . -t overture/rollcall:latest -t overture/rollcall:${version}"
96-
sh "docker push overture/rollcall:${version}"
97-
sh "docker push overture/rollcall:latest"
108+
sh "docker build --network=host -f Dockerfile . -t ${dockerHubRepo}:latest -t ${dockerHubRepo}:${version}"
109+
sh "docker push ${dockerHubRepo}:${version}"
110+
sh "docker push ${dockerHubRepo}:latest"
98111
}
112+
container('docker') {
113+
withCredentials([usernamePassword(credentialsId:'OvertureBioGithub', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
114+
sh "docker login ${gitHubRegistry} -u $USERNAME -p $PASSWORD"
115+
}
116+
sh "docker build --network=host -f Dockerfile . -t ${gitHubRegistry}/${gitHubRepo}:latest -t ${gitHubRegistry}/${gitHubRepo}:${version}"
117+
sh "docker push ${gitHubRegistry}/${gitHubRepo}:${version}"
118+
sh "docker push ${gitHubRegistry}/${gitHubRepo}:latest"
119+
}
120+
99121
}
100122
}
101123
}

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<groupId>bio.overture</groupId>
2525
<artifactId>rollcall</artifactId>
26-
<version>2.6.0</version>
26+
<version>2.7.0</version>
2727
<packaging>jar</packaging>
2828

2929
<name>rollcall</name>

0 commit comments

Comments
 (0)