diff --git a/jenkins-scripts/docker/gz-source-generation.bash b/jenkins-scripts/docker/gz-source-generation.bash index 66252259e..a56709217 100644 --- a/jenkins-scripts/docker/gz-source-generation.bash +++ b/jenkins-scripts/docker/gz-source-generation.bash @@ -22,7 +22,7 @@ BUILD_DIR=\$SOURCES_DIR/build cd \${WORKSPACE} rm -fr \$SOURCES_DIR && mkdir \$SOURCES_DIR -git clone --depth 1 --branch ${PACKAGE}_${VERSION/\~/-} ${SOURCE_REPO_URI} \${SOURCES_DIR} +git clone --depth 1 --branch ${SOURCE_REPO_REF} ${SOURCE_REPO_URI} \${SOURCES_DIR} rm -fr \$BUILD_DIR && mkdir \$BUILD_DIR cd \${BUILD_DIR} cmake .. -DPACKAGE_SOURCE_ONLY:BOOL=ON diff --git a/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy b/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy index 4e61ca7d9..c1a0bbd4c 100644 --- a/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy +++ b/jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy @@ -15,12 +15,12 @@ class OSRFSourceCreation job.with { parameters { - choiceParam('PACKAGE', - [default_params.find{ it.key == "PACKAGE"}?.value], - "Package name (can not be modified)") choiceParam('SOURCE_REPO_URI', [default_params.find{ it.key == "SOURCE_REPO_URI"}?.value], "Software repository URL (can not be modified)") + choiceParam('SOURCE_REPO_REF', + [default_params.find{ it.key == "SOURCE_REPO_REF"}?.value], + "Git branch or tag to build sources from") stringParam("VERSION", default_params.find{ it.key == "VERSION"}?.value, "Packages version to be built or nightly (enable nightly build mode)") @@ -33,6 +33,9 @@ class OSRFSourceCreation stringParam("DISTRO", default_params.find{ it.key == "DISTRO"}?.value, "Linux release inside LINUX_DISTRO to generate sources on") + choiceParam('PACKAGE', + [default_params.find{ it.key == "PACKAGE"}?.value], + "For downstream use: Package name (can not be modified)") stringParam("RELEASE_VERSION", default_params.find{ it.key == "RELEASE_VERSION"}?.value, "For downstream jobs: Packages release version") diff --git a/jenkins-scripts/dsl/test.dsl b/jenkins-scripts/dsl/test.dsl index 4f3fc45d9..56af6a360 100644 --- a/jenkins-scripts/dsl/test.dsl +++ b/jenkins-scripts/dsl/test.dsl @@ -29,8 +29,9 @@ releasepy_job.with { // gz source testing job def gz_source_job = job("_test_gz_source") OSRFSourceCreation.create(gz_source_job, [ - PACKAGE: "gz-plugin2" , - SOURCE_REPO_URI: "https://github.com/gazebosim/gz-plugin.git"]) + PACKAGE: "gz-plugin2", + SOURCE_REPO_URI: "https://github.com/gazebosim/gz-plugin.git", + SOURCE_REPO_REF: "gz-plugin2"]) OSRFSourceCreation.call_uploader_and_releasepy(gz_source_job, '_test_repository_uploader', '_test_releasepy')