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

CI deployment

parent 29e9be4c
No related branches found
No related tags found
No related merge requests found
Pipeline #71313 passed
image: maven:3-eclipse-temurin-17
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"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end"
cache:
key: "$CI_JOB_NAME"
paths:
- .m2/repository
stages:
- build
- deploy
# just check that it builds
build:
stage: build
rules:
- if: '$CI_COMMIT_TAG == null'
script:
- mvn install -s ci_settings.xml
# deploy the maven packages
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>
......@@ -21,6 +21,7 @@
<module>commonmark-ext-heading-anchor</module>
<module>commonmark-ext-image-attributes</module>
<module>commonmark-ext-ins</module>
<module>commonmark-ext-notifications</module>
<module>commonmark-ext-task-list-items</module>
<module>commonmark-ext-yaml-front-matter</module>
<module>commonmark-integration-test</module>
......@@ -77,9 +78,22 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<!--
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
......@@ -105,6 +119,7 @@
</configuration>
</plugin>
</plugins>
-->
</build>
<dependencyManagement>
......@@ -179,7 +194,7 @@
</dependency>
</dependencies>
</dependencyManagement>
<!--
<profiles>
<profile>
<id>release</id>
......@@ -243,7 +258,6 @@
<version>0.8.8</version>
<configuration>
<excludes>
<!-- Classes from test-util -->
<exclude>org/commonmark/spec/*</exclude>
<exclude>org/commonmark/test/*</exclude>
</excludes>
......@@ -285,16 +299,17 @@
<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