Skip to content
Snippets Groups Projects
Commit 5e29ced0 authored by Jari-Matti Mäkelä's avatar Jari-Matti Mäkelä
Browse files

Update deployment

parent 91cf1a8b
No related branches found
No related tags found
No related merge requests found
Pipeline #72632 failed
image: maven:latest image: maven:3-eclipse-temurin-17
variables: variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log. # This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
...@@ -14,6 +14,11 @@ cache: ...@@ -14,6 +14,11 @@ cache:
paths: paths:
- .m2/repository - .m2/repository
stages:
- build
- test
- deploy
build: build:
stage: build stage: build
script: script:
...@@ -23,3 +28,10 @@ test: ...@@ -23,3 +28,10 @@ test:
stage: test stage: test
script: script:
- mvn test - mvn test
deploy:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
script:
- mvn deploy -s ci_settings.xml
<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>${env.CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
...@@ -12,32 +12,19 @@ ...@@ -12,32 +12,19 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
<jdk.version>11</jdk.version> <jdk.version>17</jdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jqwik.version>1.3.0</jqwik.version> <jqwik.version>1.8.4</jqwik.version>
<junit.version>5.6.2</junit.version> <junit.version>5.10.2</junit.version>
<junitplatform.version>1.6.2</junitplatform.version> <junitplatform.version>1.10.2</junitplatform.version>
</properties> </properties>
<repositories> <repositories>
<repository> <repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id> <id>central</id>
<name>Central Repository</name> <name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url> <url>https://repo.maven.apache.org/maven2</url>
</repository> </repository>
<repository>
<id>jcenter</id>
<name>jcenter</name>
<url>https://jcenter.bintray.com/</url>
</repository>
<repository>
<id>ftdev</id>
<name>ftdev</name>
<url>http://ftdev.utu.fi/maven2</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
...@@ -148,21 +135,16 @@ ...@@ -148,21 +135,16 @@
</plugin> </plugin>
</plugins> </plugins>
<extensions>
<!-- Enables the use of SSH for deployments -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>3.4.1</version>
</extension>
</extensions>
</build> </build>
<distributionManagement> <distributionManagement>
<!-- where to deploy the package -->
<repository> <repository>
<id>ftdev</id> <id>gitlab-maven</id>
<name>UTU tech ftdev repository</name> <url>${env.CI_API_V4_URL}/projects/${env.CI_PROJECT_ID}/packages/maven</url>
<url>scp://localhost:2222/var/www/maven2</url>
</repository> </repository>
<snapshotRepository>
<id>gitlab-maven</id>
<url>${env.CI_API_V4_URL}/projects/${env.CI_PROJECT_ID}/packages/maven</url>
</snapshotRepository>
</distributionManagement> </distributionManagement>
</project> </project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment