From 90e6077ea0ec1858017c82fb0462cce6b16e173f Mon Sep 17 00:00:00 2001 From: Vito Conforti Date: Tue, 22 Aug 2023 12:46:12 +0000 Subject: [PATCH] Add new file .gitlab-ci.yml --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..147991f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +image: openjdk:19 # Use the appropriate Java 19 image + +stages: + - build + +variables: + MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" # Custom Maven repository location + +before_script: + - apt-get update -qy + - apt-get install -y maven + +build: + stage: build + script: + - mvn clean install # Replace with your Maven build command + artifacts: + paths: + - target/*.jar # Save JAR artifacts + +run_jar: + stage: run + script: + - java -jar target/*.jar # Replace with the actual JAR file name + dependencies: + - build # Run after the build stage -- GitLab