Commit 6e63f027 authored by Benjamin Beeker's avatar Benjamin Beeker

release to ossrh

parent 4a04a082
Pipeline #11023280 failed with stages
in 2 minutes and 7 seconds
stages:
- build
- install
- deploy
- prepare
- build
- deploy
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
key: "$CI_BUILD_REF_NAME"
policy: pull
paths:
- "*/target"
- .m2/
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
MAVEN_CLI_OPTS: "--batch-mode"
MAVEN_CLI_OPTS: "--batch-mode -s .m2/settings.xml --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
build-job:
image: maven:alpine
stage: build
script:
- mvn $MAVEN_CLI_OPTS clean install
prepare-maven:
cache:
key: "$CI_BUILD_REF_NAME"
policy: push
paths:
- .m2/
image: alpine
stage: prepare
script:
- mkdir .m2/
- apk add --update gettext
- cat ci/settings.xml | envsubst > .m2/settings.xml
verify-dependencies:
image: maven:alpine
stage: build
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- mvn $MAVEN_CLI_OPTS verify -Prelease
allow_failure: true
build-job:
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- .m2/
- "*/target"
image: maven:alpine
stage: build
except:
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- mvn $MAVEN_CLI_OPTS help:effective-settings
- mvn $MAVEN_CLI_OPTS clean install
install-job:
image: maven:alpine
stage: install
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
before_script:
- echo '<settings>
<servers>
<server>
<id>Comhix-Releases</id>
<username>'$NEXUS_USER'</username>
<password>'$NEXUS_PASSWORD'</password>
</server>
<server>
<id>Comhix-Snapshots</id>
<username>'$NEXUS_USER'</username>
<password>'$NEXUS_PASSWORD'</password>
</server>
</servers>
</settings>' > $HOME/.m2/settings.xml
script:
- mvn $MAVEN_CLI_OPTS source:jar javadoc:jar deploy
artifacts:
name: "${CI_BUILD_REF_NAME}_${CI_BUILD_REF}"
paths:
- target/*.jar
build-and-deploy:
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- .m2/
- "*/target"
image: maven:alpine
stage: build
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
before_script:
- apk add --update gnupg1
- echo "$SIGN_KEY" | gpg --import --batch
script:
- mvn $MAVEN_CLI_OPTS help:effective-settings
- mvn $MAVEN_CLI_OPTS -Prelease clean package verify source:jar javadoc:jar deploy -Dgpg.passphrase=$SIGN_PASSWORD
artifacts:
name: "${CI_BUILD_REF_NAME}_${CI_BUILD_REF}"
expire_in: 12 weeks
paths:
- "*/target/*.jar"
- "*/target/*.asc"
pages:
image: maven:alpine
......@@ -61,7 +72,7 @@ pages:
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- mvn $MAVEN_CLI_OPTS site site:stage
- mvn $MAVEN_CLI_OPTS -DskipTests site site:stage
- mkdir ./public
- cp -rv target/staging/* ./public/
artifacts:
......
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>$SONA_USER</username>
<password>$SONA_PASSWORD</password>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
\ No newline at end of file
......@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.comhix.twitch</groupId>
<version>0.2.0-SNAPSHOT</version>
<version>0.1.1</version>
<artifactId>twitch-api</artifactId>
<name>Twitch API</name>
<url>https://nozomibk.gitlab.io/twitch-api</url>
......@@ -32,7 +32,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<repository.base>http://nexus.comhix.de/repository/maven-</repository.base>
</properties>
<dependencies>
<dependency>
......@@ -53,7 +52,7 @@
<dependency>
<groupId>de.comhix.commons</groupId>
<artifactId>logging</artifactId>
<version>1.4.9</version>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
......@@ -105,42 +104,11 @@
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>Comhix-Releases</id>
<releases>
<enabled>true</enabled>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<name>ComHix releases</name>
<url>${repository.base}releases</url>
</repository>
<repository>
<id>Comhix-Snapshots</id>
<name>ComHix snapshots</name>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</snapshots>
<url>${repository.base}snapshots</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>Comhix-Releases</id>
<url>${repository.base}releases</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>Comhix-Snapshots</id>
<url>${repository.base}snapshots</url>
</snapshotRepository>
<site>
<id>${project.artifactId}-site</id>
<url>${project.baseUri}</url>
......@@ -151,6 +119,20 @@
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment