summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <>2024-04-25 13:10:50 +0200
committerThomas <>2024-04-25 13:10:50 +0200
commit15d6b986d22c219c99b5e4bce6a9919405a56509 (patch)
tree35b8b0016f63c0af9109475cdefe47320da13d8d
parent6d41c466432f08ae2df250d5d98e910fd9207430 (diff)
downloadEAAF-Components-15d6b986d22c219c99b5e4bce6a9919405a56509.tar.gz
EAAF-Components-15d6b986d22c219c99b5e4bce6a9919405a56509.tar.bz2
EAAF-Components-15d6b986d22c219c99b5e4bce6a9919405a56509.zip
build(ci): read apps.egiz.gv.at SSH Server-key from gitlab configuration
-rw-r--r--.cisettings.xml5
-rw-r--r--.gitlab-ci.yml21
2 files changed, 10 insertions, 16 deletions
diff --git a/.cisettings.xml b/.cisettings.xml
index 8556c6a8..5676268c 100644
--- a/.cisettings.xml
+++ b/.cisettings.xml
@@ -27,11 +27,6 @@
<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 01bdd6b9..f6ebe486 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,7 +7,6 @@ variables:
LIB_NAME: "eaaf-components"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true --settings ${CI_PROJECT_DIR}/.cisettings.xml"
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=${CI_PROJECT_DIR}/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
- DEPLOY_EGIZ: "apps.egiz.gv.at ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFyPUwab/Ipmc9NxI+c2i0fzLcIilh3uNebUyUYKFm04bW+aGHuwtsmAka5T3amQA0ADVMTGPWk1JGW0D0dgvXVcU8yYKYw61imKHBiPIdRNh9zVV/p5iL6bCK3AZ0UoZFfeIRNWNfKA6XGJ5e9i2DD1H8BllFOsWeUUYA8GA4tN2j8vL/dZnMcYmbisaUPuCjd7TGnbp+CcRO/f9w87qU/vp2fTG+sNBApuSR18BinUerSK9YK5qLgHxmVeIDtALq1JD5OGacvnTfAczfwSOf37+jtRzpMicGQOBQztoqfifPDAKrr6tYPrQ/pS4PKM/MnhYlvSwQa5h046REFXrx"
GIT_SUBMODULE_STRATEGY: recursive
GIT_DEPTH: "2"
SECURE_LOG_LEVEL: "debug"
@@ -23,12 +22,12 @@ dependency_scanning:
variables:
MAVEN_CLI_OPTS: "-DskipTests --settings ${CI_PROJECT_DIR}/.cisettings.xml"
DS_JAVA_VERSION: 17
-
+
spotbugs-sast:
variables:
- MAVEN_CLI_OPTS: "-DskipTests --settings ${CI_PROJECT_DIR}/.cisettings.xml"
- SAST_JAVA_VERSION: 17
-
+ MAVEN_CLI_OPTS: "-DskipTests --settings ${CI_PROJECT_DIR}/.cisettings.xml"
+ SAST_JAVA_VERSION: 17
+
default:
tags:
- docker
@@ -42,7 +41,7 @@ stages:
cache:
paths:
- ".m2/repository"
-
+
assemble:
stage: assemble
except:
@@ -58,7 +57,7 @@ assemble:
paths:
- build_reporting/target/site/jacoco-aggregate-ut/jacoco.xml
- build_reporting/target/site/jacoco-aggregate-ut/jacoco.csv
-
+
coverage:
stage: test
image: haynes/jacoco2cobertura:1.0.4
@@ -71,7 +70,7 @@ coverage:
# read the <source></source> tag and prepend the path to every filename attribute
#- 'python /opt/source2filename.py target/site/cobertura.xml'
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, " instructions covered"; print 100*covered/instructions, "% covered" }' $JACOCO_CSV_LOCATION
- needs:
+ needs:
- job: assemble
dependencies:
- assemble
@@ -80,7 +79,7 @@ coverage:
coverage_report:
coverage_format: cobertura
path: target/site/cobertura.xml
-
+
publishToGitlab:
stage: package
tags:
@@ -92,11 +91,11 @@ publishToGitlab:
- mkdir -p ~/.ssh
#- ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts
- echo $DEPLOY_EGIZ >> ~/.ssh/known_hosts
- - chmod 644 ~/.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 to public EGIZ maven"
- mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P jenkinsDeploy -DskipTests
+ mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P jenkinsDeploy -DskipTests
echo "VERSION=$VERSION" >> variables.env
artifacts:
when: always