summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2020-12-07 15:22:24 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2020-12-09 09:10:22 +0100
commit71ee7827780f15f5126f4d0cbe55ad38723fa67c (patch)
treed9d9fb9031a64b1133e49907aadfad2767173f25
parent7fb88ece6dc3a94d5dc9961a222462d893eb0888 (diff)
downloadEAAF-Components-71ee7827780f15f5126f4d0cbe55ad38723fa67c.tar.gz
EAAF-Components-71ee7827780f15f5126f4d0cbe55ad38723fa67c.tar.bz2
EAAF-Components-71ee7827780f15f5126f4d0cbe55ad38723fa67c.zip
update build pipeline to test deployment to egiz public maven
-rw-r--r--.cisettings.xml23
-rw-r--r--.gitlab-ci.yml16
-rw-r--r--pom.xml4
3 files changed, 37 insertions, 6 deletions
diff --git a/.cisettings.xml b/.cisettings.xml
index 2e050b67..8556c6a8 100644
--- a/.cisettings.xml
+++ b/.cisettings.xml
@@ -9,12 +9,29 @@
<name>Job-Token</name>
<value>${env.CI_JOB_TOKEN}</value>
</property>
- <!--property>
+ </httpHeaders>
+ </configuration>
+ </server>
+ <server>
+ <id>gitlab-localbuild</id>
+ <configuration>
+ <httpHeaders>
+ <property>
<name>Private-Token</name>
- <value>${env.CI_JOB_TOKEN}</value>
- </property-->
+ <value>${env.PRIVATE_TOKEN}</value>
+ </property>
</httpHeaders>
</configuration>
+ </server>
+ <server>
+ <id>egizMaven</id>
+ <username>${env.EGIZ_MAVEN_USER}</username>
+ <password>${env.EGIZ_MAVEN_PASSWORD}</password>
+ <configuration>
+ <knownHostsProvider implementation="org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider">
+ <hostKeyChecking>no</hostKeyChecking>
+ </knownHostsProvider>
+ </configuration>
</server>
</servers>
</settings>
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"
diff --git a/pom.xml b/pom.xml
index 104d25db..1889eb35 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,6 +103,10 @@
<url>https://gitlab.iaik.tugraz.at/api/v4/groups/119/-/packages/maven</url>
</repository>
<repository>
+ <id>gitlab-localbuild</id>
+ <url>https://gitlab.iaik.tugraz.at/api/v4/groups/119/-/packages/maven</url>
+ </repository>
+ <repository>
<id>egiz-commons</id>
<url>https://apps.egiz.gv.at/maven/</url>
<releases>