From 24cfea2feb72b5b873088758b38769affe3242ad Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 11 Oct 2023 18:14:08 +0200 Subject: [PATCH 1/4] Need source-tarball-uri param in release.py Signed-off-by: Jose Luis Rivero --- jenkins-scripts/dsl/_configs_/OSRFReleasepy.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkins-scripts/dsl/_configs_/OSRFReleasepy.groovy b/jenkins-scripts/dsl/_configs_/OSRFReleasepy.groovy index d701641f7..5c7ba392d 100644 --- a/jenkins-scripts/dsl/_configs_/OSRFReleasepy.groovy +++ b/jenkins-scripts/dsl/_configs_/OSRFReleasepy.groovy @@ -74,6 +74,7 @@ class OSRFReleasepy echo "releasing \${n} (from branch \${src_branch})" python3 ./scripts/release.py \${dry_run_str} "\${PACKAGE}" "\${VERSION}" "\${PASS}" \${extra_osrf_repo} \ + --source-tarball-uri \${SOURCE_TARBALL_URI} \ --release-repo-branch \${RELEASE_REPO_BRANCH} \ --upload-to-repo \${UPLOAD_TO_REPO} > log || echo "MARK_AS_UNSTABLE" echo " - done" From b2e821565418cdef7162972a261d724a30d6b2e4 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 11 Oct 2023 19:01:10 +0200 Subject: [PATCH 2/4] Support installation of gz-cmake to generate sources Signed-off-by: Jose Luis Rivero --- jenkins-scripts/docker/gz-source-generation.bash | 4 ++++ jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/jenkins-scripts/docker/gz-source-generation.bash b/jenkins-scripts/docker/gz-source-generation.bash index fefa7db9e..66252259e 100644 --- a/jenkins-scripts/docker/gz-source-generation.bash +++ b/jenkins-scripts/docker/gz-source-generation.bash @@ -16,6 +16,10 @@ PKG_DIR=\$WORKSPACE/pkgs SOURCES_DIR=\$WORKSPACE/sources BUILD_DIR=\$SOURCES_DIR/build +# Need to intall all supported gz-cmake* packages in the platform +(sudo apt-get install -y *gz-cmake* || sudo apt-get install -y *ign-cmake*) || \ + (echo "Can not find any ign-cmake/gz-cmake package" && exit 1) + cd \${WORKSPACE} rm -fr \$SOURCES_DIR && mkdir \$SOURCES_DIR git clone --depth 1 --branch ${PACKAGE}_${VERSION/\~/-} ${SOURCE_REPO_URI} \${SOURCES_DIR} diff --git a/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy b/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy index 552336e8b..183574cf4 100644 --- a/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy +++ b/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy @@ -36,6 +36,12 @@ class OSRFSourceCreation stringParam("EXTRA_OSRF_REPO", default_params.find{ it.key == "EXTRA_OSRF_REPO"}?.value, "For downstream jobs: OSRF extra repositories to add") + stringParam("LINUX_DISTRO", + default_params.find{ it.key == "LINUX_DISTRO"}?.value, + "Linux distribution to use to generate sources") + stringParam("DISTRO", + default_params.find{ it.key == "DISTRO"}?.value, + "Linux release inside LINUX_DISTRO to generate sources on") } } } @@ -78,10 +84,7 @@ class OSRFSourceCreation shell("""\ #!/bin/bash -xe - # Use Jammy/amd64 as base image to generate sources - export DISTRO=jammy export ARCH=amd64 - /bin/bash -x ./scripts/jenkins-scripts/docker/gz-source-generation.bash """.stripIndent() ) From 6866030dd31743c9ea84e8594ce7454d254bd1e0 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 11 Oct 2023 19:05:22 +0200 Subject: [PATCH 3/4] Do not use gz-cmake but gz-plugin in test Signed-off-by: Jose Luis Rivero --- jenkins-scripts/dsl/test.dsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins-scripts/dsl/test.dsl b/jenkins-scripts/dsl/test.dsl index 66b93cde4..4f3fc45d9 100644 --- a/jenkins-scripts/dsl/test.dsl +++ b/jenkins-scripts/dsl/test.dsl @@ -29,8 +29,8 @@ releasepy_job.with { // gz source testing job def gz_source_job = job("_test_gz_source") OSRFSourceCreation.create(gz_source_job, [ - PACKAGE: "gz-cmake3" , - SOURCE_REPO_URI: "https://github.com/gazebosim/gz-cmake.git"]) + PACKAGE: "gz-plugin2" , + SOURCE_REPO_URI: "https://github.com/gazebosim/gz-plugin.git"]) OSRFSourceCreation.call_uploader_and_releasepy(gz_source_job, '_test_repository_uploader', '_test_releasepy') From 01cceab09ea52f1246e72f38567a3b3e188d38a1 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 11 Oct 2023 19:15:19 +0200 Subject: [PATCH 4/4] Support OSRF_REPOS_TO_USE Signed-off-by: Jose Luis Rivero --- .../dsl/_configs_/OSRFSourceCreation.groovy | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy b/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy index 183574cf4..4e61ca7d9 100644 --- a/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy +++ b/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy @@ -24,6 +24,15 @@ class OSRFSourceCreation stringParam("VERSION", default_params.find{ it.key == "VERSION"}?.value, "Packages version to be built or nightly (enable nightly build mode)") + stringParam("OSRF_REPOS_TO_USE", + default_params.find{ it.key == "OSRF_REPOS_TO_USE"}?.value, + "OSRF repos name to use when building the package") + stringParam("LINUX_DISTRO", + default_params.find{ it.key == "LINUX_DISTRO"}?.value, + "Linux distribution to use to generate sources") + stringParam("DISTRO", + default_params.find{ it.key == "DISTRO"}?.value, + "Linux release inside LINUX_DISTRO to generate sources on") stringParam("RELEASE_VERSION", default_params.find{ it.key == "RELEASE_VERSION"}?.value, "For downstream jobs: Packages release version") @@ -36,12 +45,6 @@ class OSRFSourceCreation stringParam("EXTRA_OSRF_REPO", default_params.find{ it.key == "EXTRA_OSRF_REPO"}?.value, "For downstream jobs: OSRF extra repositories to add") - stringParam("LINUX_DISTRO", - default_params.find{ it.key == "LINUX_DISTRO"}?.value, - "Linux distribution to use to generate sources") - stringParam("DISTRO", - default_params.find{ it.key == "DISTRO"}?.value, - "Linux release inside LINUX_DISTRO to generate sources on") } } }