Skip to content
Snippets Groups Projects
Commit 514411c0 authored by Bernhard Johannes Berger's avatar Bernhard Johannes Berger
Browse files

Resolve "Automated release process"

parent b223533a
No related branches found
No related tags found
2 merge requests!39Merge develop into release,!27Resolve "Automated release process"
Pipeline #350513 passed with warnings
......@@ -9,10 +9,12 @@ workflow:
variables:
MAVEN_VERSION: "2024.10.0-rc1.${CI_PIPELINE_IID}"
TYCHO_VERSION: "2024.10.0-SNAPSHOT"
EVOAL_LANGUAGES_VERSION: "2024.10.0-SNAPSHOT"
- if: $CI_COMMIT_TAG != null
variables:
MAVEN_VERSION: "2024.10.0"
TYCHO_VERSION: "2024.10.0"
EVOAL_LANGUAGES_VERSION: "2024.10.0"
variables:
# This will supress any download for dependencies and plugins or upload messages,
......@@ -31,6 +33,7 @@ variables:
-s ${CI_PROJECT_DIR}/ci/settings.xml
-Dbranch=$CI_COMMIT_REF_NAME
-Drevision=${MAVEN_VERSION}
-Devoal.languages.version=${EVOAL_LANGUAGES_VERSION}
--batch-mode
--errors
-T2.0C
......@@ -67,11 +70,19 @@ variables:
default:
tags: ["docker"]
cache:
key: "$CI_PIPELINE_ID" # bind cache to pipeline
paths:
- .m2
- src/languages/*/target/
- src/evoal/*/*/target/
- key:
files:
- $LANGUAGES_POM
- $EVOAL_POM
paths:
- .m2/[!d]*
# cache:
# key: "$CI_PIPELINE_ID" # bind cache to pipeline
# paths:
# - .m2
# - src/languages/*/target/
# - src/evoal/*/*/target/
stages:
- Domain Specific Languages
......@@ -99,6 +110,7 @@ stages:
## Situations
## - push to non-protected branches
## - merge_request to any branch build
## - creation of tag
##
## Requirements
## - none
......@@ -116,6 +128,10 @@ dsl:compile-and-install:
- if: $CI_COMMIT_TAG
- when: never
script:
- >-
if [ "$CI_COMMIT_TAG" ]; then
ci/change-version-number.sh
fi
- mvn $TYCHO_CLI_OPTS -f $LANGUAGES_POM -Dbranch=$CI_COMMIT_REF_NAME flatten:flatten install
artifacts:
untracked: false
......@@ -123,12 +139,15 @@ dsl:compile-and-install:
expire_in: "30 days"
paths:
- src/languages/de.evoal.languages.releng.site/target/de.evoal.languages.releng.site-*.zip
- .m2/repository/de/evoal
- src/languages/*/target/
#############################################################
## Compile and test EvoAl
##
## Situations
## - push to non-protected branches
## - creation of tag
##
## Requirements
## - mvn install of DSLs
......@@ -141,6 +160,10 @@ evoal:compile-and-test:
$CI_COMMIT_TAG == null
- if: $CI_COMMIT_TAG
- when: never
dependencies: ["dsl:compile-and-install"]
needs:
- job: "dsl:compile-and-install"
artifacts: true
script:
- mvn $MAVEN_CLI_OPTS -f $EVOAL_POM -Dbranch=$CI_COMMIT_REF_NAME -pl "!de.evoal:releng.jacoco" flatten:flatten package
artifacts:
......@@ -150,12 +173,16 @@ evoal:compile-and-test:
expire_in: "30 days"
reports:
junit: src/evoal/*/*/target/surefire-reports/TEST-*.xml
paths:
- src/languages/*/target/
- src/evoal/*/*/target/
#############################################################
## Deploy DSL to package registry
##
## Situations
## - push to non-protected branches
## - creation of tag
##
## Requirements
## - none
......@@ -166,8 +193,17 @@ dsl:deploy:
rules:
- if: $CI_PIPELINE_SOURCE == "push" &&
$CI_COMMIT_TAG == null
- if: $CI_COMMIT_TAG
- when: never
dependencies: ["dsl:compile-and-install"]
needs:
- job: "dsl:compile-and-install"
artifacts: true
script:
- >-
if [ "$CI_COMMIT_TAG" ]; then
ci/change-version-number.sh
fi
- mvn $TYCHO_CLI_OPTS -f $LANGUAGES_POM -Dbranch=$CI_COMMIT_REF_NAME -pl "!de.evoal.languages:de.evoal.languages.model.dl.dsl.tests,!de.evoal.languages:de.evoal.languages.model.generator.dsl.tests" -DskipTests flatten:flatten deploy
......@@ -176,6 +212,7 @@ dsl:deploy:
##
## Situations
## - push to non-protected branches
## - creation of tag
##
## Requirements
## - mvn install of DSLs
......@@ -186,7 +223,14 @@ evoal:deploy:
rules:
- if: $CI_PIPELINE_SOURCE == "push" &&
$CI_COMMIT_TAG == null
- if: $CI_COMMIT_TAG
- when: never
dependencies: ["dsl:compile-and-install", "evoal:compile-and-test"]
needs:
- job: "dsl:compile-and-install"
artifacts: true
- job: "evoal:compile-and-test"
artifacts: true
script:
- mvn $MAVEN_CLI_OPTS -f $EVOAL_POM -Dbranch=$CI_COMMIT_REF_NAME -pl "!de.evoal:releng.jacoco" -DskipTests flatten:flatten deploy
......@@ -195,6 +239,7 @@ evoal:deploy:
##
## Situations
## - push to non-protected branches
## - creation of tag
##
## Requirements
## - mvn package of DSLs
......@@ -204,11 +249,17 @@ all:package:
stage: Release
image: $EVOAL_IMAGE
dependencies: ["dsl:compile-and-install", "evoal:compile-and-test"]
needs:
- job: "dsl:compile-and-install"
artifacts: true
- job: "evoal:compile-and-test"
artifacts: true
script:
- ci/create-release.sh "$CI_JOB_NAME"
rules:
- if: $CI_PIPELINE_SOURCE == "push" &&
$CI_COMMIT_TAG == null
- if: $CI_COMMIT_TAG
- when: never
artifacts:
name: "evoal-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA-release"
......@@ -221,6 +272,7 @@ all:package:
##
## Situations
## - push to non-protected branches
## - creation of tag
##
## Requirements
## - none
......@@ -233,6 +285,7 @@ pages:
rules:
- if: $CI_PIPELINE_SOURCE == "push" &&
$CI_COMMIT_TAG == null
- if: $CI_COMMIT_TAG
- when: never
script:
- python3 ci/create-pages.py
......@@ -270,6 +323,10 @@ evoal:unit:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" &&
$CI_COMMIT_TAG == null
- when: never
dependencies: ["dsl:compile-and-install"]
needs:
- job: "dsl:compile-and-install"
artifacts: true
script:
- mvn $MAVEN_CLI_OPTS -f $EVOAL_POM -Dbranch=$CI_COMMIT_REF_NAME -DskipTests package
- ci/create-release.sh
......@@ -305,6 +362,10 @@ evoal:coverage:
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" &&
$CI_COMMIT_TAG == null
- when: never
dependencies: ["evoal:unit"]
needs:
- job: evoal:unit
artifacts: true
script:
- jacoco_paths=`find src -path "**/src/main/java" -type d | sed -e 's@^@'"$CI_PROJECT_DIR"'/@'`
- python /opt/cover2cover.py src/evoal/core/de.evoal.releng.jacoco/target/site/jacoco-aggregate/jacoco.xml $jacoco_paths > src/evoal/core/de.evoal.releng.jacoco/target/site/coverage.xml
......@@ -412,3 +473,4 @@ publish:
paths:
- evoal
when: on_success
\ No newline at end of file
#!/bin/bash
echo "Changing version number to ${CI_COMMIT_TAG}"
pushd src/languages
for FILE in `find . -name MANIFEST.MF`; do
sed -e "s;Bundle-Version: [0-9.]*qualifier;Bundle-Version: ${CI_COMMIT_TAG};g" $FILE > tmp
mv tmp $FILE
done
for FILE in `find . -name feature.xml`; do
sed -e "s/[0-9]\{4\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}\.qualifier/${CI_COMMIT_TAG}/g" $FILE > tmp
mv tmp $FILE
done
......@@ -14,6 +14,7 @@
</httpHeaders>
</configuration>
</server>
<server>
<id>evoal-artifacts</id>
<configuration>
......@@ -25,9 +26,21 @@
</httpHeaders>
</configuration>
</server>
<server>
<id>central-proxy</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${env.CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
<mirrors>
<mirrors>
<mirror>
<id>local-eclipse-mirror</id>
<mirrorOf>eclipse-2022-12</mirrorOf>
......@@ -35,5 +48,12 @@
<layout>p2</layout>
<mirrorOfLayouts>p2</mirrorOfLayouts>
</mirror>
<mirror>
<id>central-proxy</id>
<name>GitLab proxy of central repo</name>
<url>https://gitlab.informatik.uni-bremen.de/api/v4/projects/30380/dependency_proxy/packages/maven</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment