From bd5e0478aa1d760cd5539bddeef5091417a3d87e Mon Sep 17 00:00:00 2001 From: lewa <lene.wasskog@nibio.no> Date: Thu, 1 Dec 2022 15:11:13 +0100 Subject: [PATCH] chore: Add ci config for pipeline with build+test --- .gitlab-ci.yml | 21 +++++++++++++++++++++ ci_settings.xml | 16 ++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 ci_settings.xml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..84f7adb --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +image: maven:3.8.6-openjdk-11 +stages: + - build + - test + +variables: + MAVEN_CLI_OPTS: "-s ci_settings.xml --batch-mode" + +build: + stage: build + script: + - './mvnw $MAVEN_CLI_OPTS compile' + tags: + - vips-docker + +test: + stage: test + script: + - './mvnw $MAVEN_CLI_OPTS test' + tags: + - vips-docker \ No newline at end of file diff --git a/ci_settings.xml b/ci_settings.xml new file mode 100644 index 0000000..da49fc0 --- /dev/null +++ b/ci_settings.xml @@ -0,0 +1,16 @@ +<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> + <servers> + <server> + <id>gitlab-maven</id> + <configuration> + <httpHeaders> + <property> + <name>Job-Token</name> + <value>${CI_JOB_TOKEN}</value> + </property> + </httpHeaders> + </configuration> + </server> + </servers> +</settings> \ No newline at end of file -- GitLab