Optimize ci

This commit is contained in:
Andreas Penski 2021-05-20 10:30:18 +00:00
parent c1b5c0ab81
commit 99ffe18d2b
6 changed files with 153 additions and 57 deletions

15
.mvn/createBuildImages.sh Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
TAGS=("3-openjdk-16" "3-jdk-11" "3-jdk-11-openj9" "3-jdk-8" "3-jdk-8-openj9", "3-openjdk-15", "3-openjdk-17")
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
for i in "${TAGS[@]}"
do
echo Creating build image for "$i"
{
echo "FROM maven:${i}"
} >> Dockerfile
docker build -t "$CI_REGISTRY_IMAGE/maven:$i" .
docker push "$CI_REGISTRY_IMAGE/maven:${i}"
rm Dockerfile
done

1
.mvn/jvm.config Normal file
View file

@ -0,0 +1 @@
-Xms128m -Xmx512m

47
.mvn/settings.xml Normal file
View file

@ -0,0 +1,47 @@
<!--
~ Copyright 2017-2021 Koordinierungsstelle für IT-Standards (KoSIT)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<!--
~ Copyright 2017-2021 Koordinierungsstelle für IT-Standards (KoSIT)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<servers>
<server>
<id>gitlab-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${env.CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>