Skip to content
Snippets Groups Projects
Commit 56a2be11 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

war -> jar

parent a6a66f8e
No related branches found
No related tags found
3 merge requests!1700Resolve "introduce new frontend to the jar file build process",!1644Draft: Resolve "cache drug/mirna/chemicals data in the background",!1637Resolve "remove tomcat requirement"
......@@ -375,7 +375,7 @@ test:backend:web:hsql:
<<: *jdk_11_definition
script: *test_backend_web_definition
build_war:
build_jar:
image: maven:3.8.6-jdk-8
stage: build
only:
......@@ -385,18 +385,20 @@ build_war:
artifacts:
expire_in: 1 day
paths:
- minerva.war
- minerva.jar
script:
- rm -rf /etc/minerva/
- mkdir /etc/minerva/
- cp test-hsql-db-ci.properties /etc/minerva/db.properties
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y curl gnupg git ant
- DEBIAN_FRONTEND=noninteractive apt-get install -y curl gnupg git
- curl -sL https://deb.nodesource.com/setup_12.x | bash -
- DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
- ant maven-build-with-doc
- cp web/target/*.war minerva.war
- mvn clean compile install -DskipTests=true
- cd web
- mvn clean compile install package spring-boot:repackage
- cp target/*exec.jar ../minerva.jar
test:dependency_conflict:
image: maven:3.8.6-jdk-8
......@@ -449,7 +451,7 @@ build_debian_package:
tags:
- privileged
dependencies:
- build_war
- build_jar
artifacts:
# you cannot enforce never here yet
expire_in: 1000 yrs
......@@ -457,7 +459,7 @@ build_debian_package:
- "debian/*.deb"
script:
- mkdir web/target/
- mv minerva.war web/target/web-1.0.war
- mv minerva.jar web/target/minerva-exec.jar
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y dh-make build-essential lintian devscripts xsltproc fakeroot xsltproc docbook-xsl
- export DEBFULLNAME="Piotr Gawron"
......@@ -567,44 +569,13 @@ test_install_debian_package:
- test 200 = $(curl -X POST -d "login=admin&password=admin" --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/)
build_rpm:
image: centos:7
stage: packaging
dependencies:
- build_war
only:
- tags
tags:
- privileged
artifacts:
# you cannot enforce never here yet
expire_in: 1000 yrs
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
only:
- tags
script:
- yum -y install rpmlint
- rpmlint -f rpm/rpmlint.config rpm/rpmbuildtemp/RPMS/noarch/minerva-*.rpm
test_deploy_with_db_without_superadmin_rights:
image: tomcat:8-jre8
image: maven:3.8.6-jdk-8
stage: test
services:
- postgres:9.6
dependencies:
- build_war
- build_jar`
tags:
- privileged
only:
......@@ -618,6 +589,7 @@ test_deploy_with_db_without_superadmin_rights:
- echo "database.password=test" >> /etc/minerva/db.properties
- echo "CREATE DATABASE test;CREATE USER test WITH ENCRYPTED PASSWORD 'test';GRANT ALL PRIVILEGES ON DATABASE test TO test;" >tmp.sql
- PGPASSWORD=$POSTGRES_PASSWORD psql -h postgres -U $POSTGRES_USER $POSTGRES_DB < tmp.sql
- FIX ME!!!!!!!!!
- mv minerva.war /usr/local/tomcat/webapps/minerva.war
- /usr/local/tomcat/bin/startup.sh
- sleep 15
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment