From 1365ed3feda9bd05993d162d7c0c2dd84730e441 Mon Sep 17 00:00:00 2001 From: Eamonn Mansour <47121388+eamansour@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:12:47 +0100 Subject: [PATCH] Add signing to dev.galasa.extensions.manifest artifact (#260) * Add signing to dev.galasa.extensions.manifest artifact Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com> * Remove duplicate framework dependencies, Bump versions in parent build.gradle Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com> --------- Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com> --- galasa-extensions-parent/build.gradle | 24 ++++++++++++------- .../dev.galasa.events.kafka/build.gradle | 1 - .../dev.galasa.extensions.mocks/build.gradle | 1 - set-version.sh | 3 ++- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/galasa-extensions-parent/build.gradle b/galasa-extensions-parent/build.gradle index cec24719..2aa89c95 100644 --- a/galasa-extensions-parent/build.gradle +++ b/galasa-extensions-parent/build.gradle @@ -2,16 +2,10 @@ plugins { id 'biz.aQute.bnd.builder' version '5.3.0' apply false id 'dev.galasa.githash' version '0.15.0' apply false id 'maven-publish' + id 'signing' } -version = '0.36.0' - -task clean { - // make sure the build directory is gone - doFirst { - delete layout.buildDirectory - } -} +version = '0.37.0' //--------------------------------------------------------------- // We need to gather the release and packaging metadata from each @@ -148,6 +142,18 @@ subprojects { task allDeps(type: DependencyReportTask) {} } +signing { + def signingKeyId = findProperty("signingKeyId") + def signingKey = findProperty("signingKey") + def signingPassword = findProperty("signingPassword") + useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) + sign publishing.publications +} + +tasks.withType(Sign) { + onlyIf { isMainOrRelease.toBoolean() } +} + // Publish the release.yaml as a maven artifact. // Note: The maven co-ordinates are versioned using the version for this bundle. publishing { @@ -161,7 +167,7 @@ publishing { name = "Manifest for extensions bundle versions" artifactId = "dev.galasa.extensions.manifest" groupId = 'dev.galasa' - version = "0.36.0" + version = '0.37.0' description = "Conveys bundle version information to OBR builds." licenses { license { diff --git a/galasa-extensions-parent/dev.galasa.events.kafka/build.gradle b/galasa-extensions-parent/dev.galasa.events.kafka/build.gradle index 17eca931..4fe0f121 100644 --- a/galasa-extensions-parent/dev.galasa.events.kafka/build.gradle +++ b/galasa-extensions-parent/dev.galasa.events.kafka/build.gradle @@ -10,7 +10,6 @@ version = '0.37.0' dependencies { implementation 'dev.galasa:kafka.clients:3.7.0' - implementation 'dev.galasa:dev.galasa.framework:0.37.0' testImplementation(project(':dev.galasa.extensions.mocks')) } diff --git a/galasa-extensions-parent/dev.galasa.extensions.mocks/build.gradle b/galasa-extensions-parent/dev.galasa.extensions.mocks/build.gradle index 511cae94..95c8bf80 100644 --- a/galasa-extensions-parent/dev.galasa.extensions.mocks/build.gradle +++ b/galasa-extensions-parent/dev.galasa.extensions.mocks/build.gradle @@ -14,7 +14,6 @@ dependencies { implementation ('org.apache.httpcomponents:httpclient-osgi:4.5.13') implementation ('org.apache.httpcomponents:httpcore-osgi:4.4.14') implementation ('com.google.code.gson:gson:2.10.1') - implementation ('dev.galasa:dev.galasa.framework:0.37.0') implementation ('junit:junit:4.13.1') implementation ('org.assertj:assertj-core:3.16.1') implementation (project(':dev.galasa.extensions.common')) diff --git a/set-version.sh b/set-version.sh index 0f547d16..1bdfb148 100755 --- a/set-version.sh +++ b/set-version.sh @@ -106,13 +106,14 @@ function bump_version { cat $source_file | sed "s/dev.galasa.framework:.*'/dev.galasa.framework:$component_version'/1" > $temp_file cp $temp_file $source_file - cat $source_file | sed "s/version = '.*'/version = '$component_version'/1" > $temp_file + cat $source_file | sed "s/version[ ]*=.*/version = '$component_version'/1" > $temp_file cp $temp_file $source_file } # Extensions base bump_version $BASEDIR/galasa-extensions-parent/buildSrc/src/main/groovy/galasa.extensions.gradle $temp_dir/galasa.extensions.gradle +bump_version $BASEDIR/galasa-extensions-parent/build.gradle $temp_dir/extensions-parent.build.gradle # Couchdb... bump_version $BASEDIR/galasa-extensions-parent/dev.galasa.ras.couchdb/build.gradle $temp_dir/couchdb-build.gradle