Skip to content
Snippets Groups Projects
Commit ef890f20 authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Feat/gitlabci

parent 89c3a371
No related branches found
No related tags found
No related merge requests found
---
# Build JAVA applications using Apache Maven (http://maven.apache.org)
stages:
- build
- test
- deploy
variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# Backend
MAVEN_CLI_OPTS_1: "-f dmnverifierapi/pom.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
# Frontend
MAVEN_CLI_OPTS_2: "-f dmnverifierfrontend/pom.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
paths:
- .m2/repository
# Remove trash after builds
default:
after_script:
- sudo rm -rf *
.validate: &validate
stage: build
script:
- 'sudo mvn $MAVEN_CLI_OPTS_1 test-compile'
- 'sudo mvn $MAVEN_CLI_OPTS_2 test-compile'
# For merge requests do not `install` but only run `verify`.
# See https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
.verify: &verify
stage: test
script:
- 'sudo mvn $MAVEN_CLI_OPTS_1 verify'
- 'sudo mvn $MAVEN_CLI_OPTS_2 verify'
except:
- master
# Validate merge requests using JDK8
validate:jdk8:
<<: *validate
image: maven:3.6.0-jdk-8
# Verify merge requests using JDK8
verify:jdk8:
<<: *verify
image: maven:3.6.0-jdk-8
deploy:
image: busybox:latest
stage: deploy
script:
- sudo systemctl stop dmn-verifier-backend
- sudo systemctl stop dmn-verifier-frontend
- 'sudo mvn $MAVEN_CLI_OPTS_1 clean install -DskipTests'
- sudo cp dmnverifierapi/target/*-runner.jar /opt/dmn/dmn-backend-runner.jar
- 'sudo mvn $MAVEN_CLI_OPTS_2 clean install -DskipTests'
- sudo cp dmnverifierfrontend/target/*-runner.jar /opt/dmn/dmn-frontend-runner.jar
- sudo systemctl start dmn-verifier-backend
- sudo systemctl start dmn-verifier-frontend
only:
- master
\ No newline at end of file
......@@ -12,12 +12,15 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>dmn-verifier-frontend</artifactId>
<build>
<build>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.version}</version>
<configuration>
<uberJar>true</uberJar>
</configuration>
<executions>
<execution>
<goals>
......@@ -26,6 +29,19 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>jandex-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jandex</goal>
</goals>
<id>make-index</id>
</execution>
</executions>
<groupId>org.jboss.jandex</groupId>
<version>1.0.6</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
......
let rootUrl = 'http://192.168.2.109:8080/';
let rootUrl = 'http://dmn.fg-bks.uni-koblenz.de:8080/';
let dmnApi = rootUrl + 'api/dmn/';
/**
......
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