From 2a67778ec517dc68b35586af76f797ef04428312 Mon Sep 17 00:00:00 2001 From: Wolfram Gulde Date: Thu, 23 Dec 2021 15:29:43 +0100 Subject: [PATCH 1/2] feat(Version): add package --- push-tag-and-version-template.gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/push-tag-and-version-template.gitlab-ci.yml b/push-tag-and-version-template.gitlab-ci.yml index 0697a93..a04a546 100644 --- a/push-tag-and-version-template.gitlab-ci.yml +++ b/push-tag-and-version-template.gitlab-ci.yml @@ -16,6 +16,7 @@ - curl "https://img.shields.io/static/v1?label=Version-&message=$VERSION&color=green" -o $ARTIFACT.svg - > if [ "${MVN_VERSION}" == "true" ]; then - mvn $MVN_EXTRA_ARGS versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false + mvn $MVN_EXTRA_ARGS $MAVEN_CLI_OPTS versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false + mvn $MVN_EXTRA_ARGS $MAVEN_CLI_OPTS package fi - push $VERSION From e6a473562ab87d194b5648bbb87e8a6974a68f7f Mon Sep 17 00:00:00 2001 From: Wolfram Gulde Date: Tue, 25 Jan 2022 08:34:28 +0100 Subject: [PATCH 2/2] docs(Templates): add mvn package docs --- .../chapters/templates/push-tag-and-version-template.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/chapters/templates/push-tag-and-version-template.adoc b/documentation/chapters/templates/push-tag-and-version-template.adoc index 10f06a8..a2d9c7b 100644 --- a/documentation/chapters/templates/push-tag-and-version-template.adoc +++ b/documentation/chapters/templates/push-tag-and-version-template.adoc @@ -2,15 +2,15 @@ = push-tag-and-version-template -This template creates a new tag und updates the version of your project in the repository. -For more details: https://gitlab.exxcellent.de/gilden/ci/exxcellent-ssh-tool[Gilde CI/CD: exxcellent-ssh-tool]. +This template creates a new tag und updates the version of your project in the repository. Additionally, the template builds a new artifact with the `mvn package` command after setting the version which then can be exported with the gitlab-ci _artifacts_ keyword and used in subsequent stages. +For more details: https://gitlab.exxcellent.de/gilden/ci/exxcellent-ssh-tool[Gilde CI/CD: exxcellent-ssh-tool]. .Variables |=== |Name |Description | Default Value |ARTIFACT | the name of the artifact the new version is written to by the `set-version` job |"version" -|MVN_VERSION | defines if the `mvn version:set` command will be run | "true" +|MVN_VERSION | defines if the `mvn version:set` command will be run. Additionally creates a new artifact with the `mvn package` command which can be exported within the _artifacts_ section | "true" |MVN_EXTRA_ARGS | sets extra args which will be added behind the `mvn` command | "" |===