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

CI deployment

parent 30e87f2e
No related branches found
No related tags found
No related merge requests found
Pipeline #71056 failed
image: maven:3-eclipse-temurin-17
variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
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"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add ''
cache:
key: "$CI_JOB_NAME"
paths:
- .m2/repository
stages:
- deploy
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>
......@@ -280,22 +280,16 @@
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/commonmark/commonmark-java</connection>
<developerConnection>scm:git:https://github.com/commonmark/commonmark-java</developerConnection>
<url>https://github.com/commonmark/commonmark-java</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<id>gitlab-maven</id>
<url>${env.CI_API_V4_URL}/projects/${env.CI_PROJECT_ID}/packages/maven</url>
</repository>
<snapshotRepository>
<id>gitlab-maven</id>
<url>${env.CI_API_V4_URL}/projects/${env.CI_PROJECT_ID}/packages/maven</url>
</snapshotRepository>
</distributionManagement>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment