Skip to content

Commit

Permalink
OSRFSourceCreation: use git refs instead of calculate it
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Oct 13, 2023
1 parent 312fa95 commit 4f82d8c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jenkins-scripts/docker/gz-source-generation.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions jenkins-scripts/dsl/_configs_/OSRFSourceCreation.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand All @@ -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")
Expand Down
5 changes: 3 additions & 2 deletions jenkins-scripts/dsl/test.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 4f82d8c

Please sign in to comment.