Basic Java8 release tool (with Maven Central deployment)
211
Source code: https://github.com/brobert83/basic-java8-release
The purpose of this container is to perform a "Release" of a Java 8 package built with Maven and push it to Maven Central.
| Env Variable | Default value | Required | Comments |
|---|---|---|---|
| DEPLOY | yes | To skip mvn deploy just override this with anything other than yes | |
| RELEASE_TYPE | PATCH | Must be PATCH, MINOR or MAJOR (case insensitive) | |
| GITHUB_REPO | YES | ||
| GITHUB_BRANCH | master | ||
| GITHUB_USERNAME | YES | ||
| GITHUB_EMAIL | YES | ||
| GITHUB_TOKEN_FILE | /work/secrets/github_token | ||
| SIGNING_KEY_FILE | /work/secrets/signingkey.asc | ||
| GPG_KEY_NAME_FILE | /work/secrets/gpg_keyname | ||
| GPG_KEY_PASSPHRASE_FILE | /work/secrets/gpg_key_passphrase | ||
| SONATYPE_USERNAME_FILE | /work/secrets/sonatype_username | ||
| SONATYPE_PASSWORD_FILE | /work/secrets/sonatype_password |
/work/secretsdocker run \
-e GITHUB_REPO=github.com/${github_username}/${repo}.git \
-e GITHUB_USERNAME=${github_username} \
-e GITHUB_EMAIL=${github_email} \
-v $(pwd)/../secrets:/work/secrets \
-v $(pwd)/.m2:/root/.m2 \
robertbaboi/basic-java8-release
${release_version}) from pom.xml and calculate the next version(${next_version}) using the RELEASE_TYPE env var
^([0-9]+)\.([0-9]+)\.([0-9]+)\-SNAPSHOT$2.5.22.6.03.0.0RELEASE_${RELEASE_TYPE}_${release_version}${release_version}mvn clean deploy \
-DskipTests=true \
-Prelease \
--settings /work/settings.xml \
-Dgpg.executable=gpg2 \
-Dgpg.keyname=${gpg_keyname} \
-Dgpg.passphrase=${gpg_key_passphrase}
release profilev${release_version}${next_version} and commit<scm>
<connection>scm:git:https://github.com/<<username>>/<<repo>>.git</connection>
<developerConnection>scm:git:ssh://github.com/<<username>>/<<repo>>.git</developerConnection>
<url>https://github.com/<<username>>/<<repo>></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>
</repository>
</distributionManagement>
release build profile<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Content type
Image
Digest
Size
114.5 MB
Last updated
almost 6 years ago
docker pull robertbaboi/basic-java8-release