-
Notifications
You must be signed in to change notification settings - Fork 4
/
all-services.jenkinsfile
158 lines (156 loc) · 5.6 KB
/
all-services.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
pipeline
{
agent any
environment
{
// NOTE: this file must be executed in a directory whose name is a numeric sequence, and whose parent is named "Releases".
// This is how other Jenkinsfiles in the Release process determine the current release number.
RELEASE_VERSION = getReleaseVersionTag();
}
stages
{
// End of probably removable code
stage('Download graphdb')
{
steps
{
dir("neo4j")
{
script
{
if (!fileExists('reactome-${env.RELEASE_VERSION}.graphdb.tgz'))
{
fileOperations([fileDownloadOperation(password: '', proxyHost: '', proxyPort: '', targetFileName: "reactome-${env.RELEASE_VERSION}.graphdb.tgz", targetLocation: './', url: 'https://reactome.org/download/current/reactome.graphdb.tgz', userName: '')])
}
sh "ls -lht"
}
}
}
}
stage("Build graphdb")
{
steps
{
dir("neo4j")
{
script
{
sh "ls -lht"
docker.build("reactome/graphdb:${env.RELEASE_VERSION} --build-arg GRAPHDB_LOCATION=reactome-${env.RELEASE_VERSION}.graphdb.tgz --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f ./neo4j_stand-alone.dockerfile")
}
}
}
}
stage("analysis-core")
{
steps
{
dir("analysis-core")
{
script
{
docker.build("reactome/analysis-core:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f analysis-core.dockerfile")
}
}
}
}
stage("fireworks-generator")
{
steps
{
dir("fireworks-generator")
{
script
{
docker.build("reactome/fireworks-generator:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f fireworks-generator.dockerfile")
}
}
}
}
stage("mysql database and diagram files")
{
steps
{
dir("mysql")
{
script
{
docker.build("reactome/reactome-mysql:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f mysql.dockerfile")
}
}
dir("diagram-generator")
{
script
{
docker.build("reactome/diagram-generator:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f diagram-generator.dockerfile")
}
}
}
}
stage("solr-index")
{
steps
{
dir("solr")
{
script
{
docker.build("reactome/solr:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f index-builder.dockerfile")
}
}
}
}
stage ("Build web applications")
{
parallel
{
stage("Analysis Service image")
{
steps
{
dir("stand-alone-analysis-service")
{
script
{
docker.build("reactome/stand-alone-analysis-service:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f analysis-service.dockerfile")
}
}
}
}
stage("Content Service image")
{
steps
{
dir("stand-alone-content-service")
{
script
{
docker.build("reactome/stand-alone-content-service:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} -f content-service.dockerfile")
}
}
}
}
}
}
stage("Pathway Browser image")
{
steps
{
dir("pathway-browser")
{
script
{
// Make sure you set up the github Personal Access Token before this step runs.
// you can (re-)generate your github token in Github by going to Settings -> Developer Settings -> Personal Access Token
docker.build("reactome/analysis-service-and-pwb:${env.RELEASE_VERSION} --build-arg RELEASE_VERSION=${env.RELEASE_VERSION} --build-arg GITHUB_TOKEN=${env.GITHUB_TOKEN} -f pathway-browser.dockerfile")
}
}
}
}
}
}
// Gets release number from URL of job. The expectation, as mentioned above, is that the URL will have a format of 'Releases/XX', where XX is the release number.
def getReleaseVersionTag()
{
return "Release" + (pwd() =~ /Releases\/(\d+)\//)[0][1];
}