Newer
Older
Piotr Gawron
committed
variables:
POSTGRES_DB: map_viewer
POSTGRES_USER: map_viewer
POSTGRES_PASSWORD: "123qweasdzxc"
#xvfb is for X11 connection used by some parts of the java code: https://stackoverflow.com/a/47575851/1127920
Piotr Gawron
committed
- apt-get install -y xvfb
- Xvfb :99 &
- export DISPLAY=:99
- mvn -DskipTests=true clean install -pl commons -am
- mvn test -pl commons
test_backend 2 15:
image: maven:latest
services:
- postgres:9.6
stage: test
script:
Piotr Gawron
committed
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/test-db.properties
- mvn -DskipTests=true clean install -pl annotation -am
- mvn test -pl annotation
test_backend 3 15:
image: maven:latest
stage: test
script:
- mvn -DskipTests=true clean install -pl CellDesigner-plugin -am
- mvn test -pl CellDesigner-plugin
test_backend 4 15:
image: maven:latest
stage: test
script:
- mvn -DskipTests=true clean install -pl converter -am
- mvn test -pl converter
test_backend 5 15:
image: maven:latest
stage: test
script:
- mvn -DskipTests=true clean install -pl converter-graphics -am
- mvn test -pl converter-graphics
test_backend 6 15:
image: maven:latest
stage: test
script:
- mvn -DskipTests=true clean install -pl converter-CellDesigner -am
test_backend 7 15:
image: maven:latest
services:
- postgres:9.6
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/test-db.properties
- mvn -DskipTests=true clean install -pl converter-SBGNML -am
- mvn test -pl converter-SBGNML
test_backend 8 15:
image: maven:latest
stage: test
script:
- mvn -DskipTests=true clean install -pl converter-sbml -am
- mvn test -pl converter-sbml
test_backend 9 15:
image: maven:latest
stage: test
script:
- mvn -DskipTests=true clean install -pl model -am
- mvn test -pl model
test_backend 10 15:
image: maven:latest
stage: test
script:
- mvn -DskipTests=true clean install -pl model-command -am
- mvn test -pl model-command
test_backend 11 15:
image: maven:latest
stage: test
script:
- mvn -DskipTests=true clean install -pl pathvisio -am
- mvn test -pl pathvisio
test_backend 12 15:
image: maven:latest
services:
- postgres:9.6
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/test-db.properties
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
- mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist
test_backend 13 15:
image: maven:latest
services:
- postgres:9.6
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/test-db.properties
- mvn -DskipTests=true clean install -pl reactome -am
- mvn test -pl reactome
test_backend 14 15:
image: maven:latest
services:
- postgres:9.6
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/test-db.properties
- mvn -DskipTests=true clean install -pl rest-api -am
- mvn test -pl rest-api
test_backend 15 15:
image: maven:latest
services:
- postgres:9.6
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/test-db.properties
- mvn -DskipTests=true clean install -pl service -am
- mvn test -pl service
paths:
- minerva.war
script:
- apt-get install -y curl gnupg git ant sudo
- curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
- ant maven-build
- cp web/target/web-1.0.war minerva.war
build_debian_package:
image: debian
only:
- tags
dependencies:
- build_war
artifacts:
paths:
- "debian/*.deb"
script:
- apt-get install -y dh-make build-essential lintian devscripts xsltproc fakeroot xsltproc docbook-xsl
- export DEBFULLNAME="Piotr Gawron"
- export DEBEMAIL="piotr.gawron@uni.lu"
- debian/create-debian-pkg.sh
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
test_upgrade_debian_package:
image: debian
stage: test
only:
- tags
# we need to run it in privileged mode due to: https://stackoverflow.com/questions/29683231/tomcat7-fail-to-start-inside-ubuntu-docker-container
tags:
- privileged
services:
- name: piotrgawron/debian-repo
alias: debian-repo
dependencies:
- build_debian_package
script:
- apt-get update
- apt-get install -y ssh software-properties-common dirmngr wget curl apt-transport-https
- debian_file=$(ls debian/*.deb)
- version=$(echo $debian_file| cut -f2 -d"_")
- echo "PUT $debian_file /docker/incoming" | sftp -o StrictHostKeyChecking=no user@debian-repo
- ssh root@debian-repo /usr/local/sbin/reprepro-import
- apt-add-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main"
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
- apt-add-repository "deb http://repo-r3lab.uni.lu/debian/ stable main"
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xcb185f4e31872412
- apt-get update
# auto accept oracle license
- echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
#hacky way of installing minerva on docker - by default rc-invoke is preventing services changes on docker
- mv /usr/sbin/policy-rc.d /usr/sbin/policy-rc.d.backup
- mv Docker/policy-rc.d /usr/sbin/policy-rc.d
- apt-get install -y --allow-unauthenticated minerva
#local repository with new version
- apt-add-repository "deb http://debian-repo/ unstable main"
- apt-get update
- apt-get dist-upgrade -y --allow-unauthenticated
- mv /usr/sbin/policy-rc.d.backup /usr/sbin/policy-rc.d
- service tomcat8 start
#we need to wait a bit for tomcat start
- sleep 15
- wget http://localhost:8080/minerva/
#test if we can login and get configuration using new version
- test 200 = $(curl --write-out %{http_code} --silent --output /dev/null -c cookie.txt http://localhost:8080/minerva/api/doLogin)
- test 200 = $(curl --write-out %{http_code} --silent --output configuration.json --cookie cookie.txt http://localhost:8080/minerva/api/configuration/)
- test 1 = $(cat configuration.json| grep $version | wc -l)
test_install_debian_package:
image: debian
stage: test
only:
- tags
# we need to run it in privileged mode due to: https://stackoverflow.com/questions/29683231/tomcat7-fail-to-start-inside-ubuntu-docker-container
services:
- name: piotrgawron/debian-repo
alias: debian-repo
dependencies:
- build_debian_package
script:
- apt-get update
- apt-get install -y ssh software-properties-common dirmngr wget curl
- debian_file=$(ls debian/*.deb)
- echo "PUT $debian_file /docker/incoming" | sftp -o StrictHostKeyChecking=no user@debian-repo
- ssh root@debian-repo /usr/local/sbin/reprepro-import
- apt-add-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main"
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
- apt-add-repository "deb http://debian-repo/ unstable main"
- apt-get update
- echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
#hacky way of installing minerva on docker - by default rc-invoke is preventing services changes on docker
- mv /usr/sbin/policy-rc.d /usr/sbin/policy-rc.d.backup
- mv Docker/policy-rc.d /usr/sbin/policy-rc.d
- apt-get install -y --allow-unauthenticated minerva
- mv /usr/sbin/policy-rc.d.backup /usr/sbin/policy-rc.d
- service tomcat8 start
- sleep 15
- wget http://localhost:8080/minerva/
- test 200 = $(curl --write-out %{http_code} --silent --output /dev/null -c cookie.txt http://localhost:8080/minerva/api/doLogin)
- test 200 = $(curl --write-out %{http_code} --silent --output /dev/null --cookie cookie.txt http://localhost:8080/minerva/api/projects/)
tags:
- privileged
artifacts:
paths:
- "rpm/rpmbuildtemp/RPMS/noarch/minerva-*.rpm"
script:
- yum -y install rpmdevtools unzip
- rpm/buildrpm.sh minerva.war
rpmlint:
image: centos:7
stage: test
dependencies:
- build_rpm
tags:
- privileged
script:
- yum -y install rpmlint
- rpmlint rpm/rpmbuildtemp/RPMS/noarch/minerva-*.rpm