From 71ee7827780f15f5126f4d0cbe55ad38723fa67c Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 7 Dec 2020 15:22:24 +0100 Subject: update build pipeline to test deployment to egiz public maven --- .gitlab-ci.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db89c941..37ca635e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ stages: cache: paths: - ".m2/repository" - + assemble: stage: assemble except: @@ -42,10 +42,14 @@ publishToGitlab: stage: package except: - tags + before_script: + - mkdir -p ~/.ssh + - ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts script: | export VERSION=$(mvn -B help:evaluate -Dexpression=project.version -B | grep -v "\[INFO\]" | grep -Po "\d+\.\d+\.\d+((-\w*)+)?") - echo "Publishing version $VERSION for $LIB_NAME" - mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P gitlabDeploy + echo "Publishing version $VERSION for $LIB_NAME to public EGIZ maven" + mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P jenkinsDeploy -DskipTests echo "VERSION=$VERSION" >> variables.env artifacts: when: always @@ -61,8 +65,14 @@ release: when: manual only: - master + before_script: + - mkdir -p ~/.ssh + - ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts script: | echo "Releasing version $VERSION of $LIB_NAME" + echo "Publishing version $VERSION to public EGIZ maven" + mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P jenkinsDeploy release: name: "$VERSION" tag_name: "v$VERSION" -- cgit v1.2.3