Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
feat: rebuild all components after the version bump (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed May 25, 2023
1 parent d46dfad commit c9baa32
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions publish_component.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ pipeline {
versionProp="-Pversion=$VERSION"
# update the version in the codebase
sed -i "s#0.0.1-SNAPSHOT#$VERSION#g" gradle.properties
sed -i "s#0.0.1-SNAPSHOT#$VERSION#g" $(find . -name "*.java")
oldVersion=$(grep "version" gradle.properties | awk -F= '{print $2}')
grep -rlz "$oldVersion" . | xargs sed -i "s/$oldVersion/$VERSION/g"
# if the version doesn't end with -SNAPSHOT we need to handle staging/releasing
if [[ $VERSION != *-SNAPSHOT ]]
Expand Down
14 changes: 13 additions & 1 deletion release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pipeline {

stage('publish-artifacts') {
steps {
build job: 'Publish-All-In-One', parameters: [string(name: 'VERSION', value: "${VERSION}")]
build job: 'Publish-All-In-One', parameters: [string(name: 'VERSION', value: "${VERSION}")]
}
}

Expand All @@ -35,6 +35,18 @@ pipeline {
}
}

// during the 'release' stage, every repo gets its version bumped, so we need to publish again, sequentially
// at this time, all components should already have their snapshot version bumped, so no need to explicitly supply the VERSION parameter
stage('publish-new-snapshot') {
steps {
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/GradlePlugins")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/Connector")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/IdentityHub")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/RegistrationService")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/FederatedCatalog")]
}
}

}

post {
Expand Down
3 changes: 0 additions & 3 deletions scripts/test_components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ pids+=($!)
./scripts/github_action.sh "eclipse-edc" "federatedcatalog" "verify.yaml" "" $BOT $BOTTOKEN &
pids+=($!)

./scripts/github_action.sh "eclipse-edc" "minimumviabledataspace" "cd.yaml" "" $BOT $BOTTOKEN &
pids+=($!)

# Wait worfklows completion, if any of them fail, the script will fail.
for pid in "${pids[@]}"; do
wait "$pid"
Expand Down

0 comments on commit c9baa32

Please sign in to comment.