Skip to content

Commit

Permalink
Initial customization for reprepro-updater
Browse files Browse the repository at this point in the history
Support for parameters to enable/disable the sync triggered
to main, testing and building repositories. All are default
to true to keep compatibility with previous un-parametrize
behaviour.

Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Dec 13, 2024
1 parent c196ca5 commit bf7fc47
Showing 1 changed file with 33 additions and 9 deletions.
42 changes: 33 additions & 9 deletions ros_buildfarm/templates/release/deb/import_upstream_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ Generated at @ESCAPE(now_str) from template '@ESCAPE(template_name)'</descriptio
'description': 'If this is not true, it will only do a dry run and print the expect import, but not execute.',
'default_value': 'false',
},
{
'type': 'boolean',
'name': 'IMPORT_TO_MAIN',
'description': 'Use the ubuntu_main repository as one of the targets for the import',
'default_value': 'true',
},
{
'type': 'boolean',
'name': 'IMPORT_TO_TESTING',
'description': 'Use the ubuntu_testing repository as one of the targets for the import',
'default_value': 'true',
},
{
'type': 'boolean',
'description': 'Use the ubuntu_building repository as one of the targets for the import',
'name': 'IMPORT_TO_BUILDING',
'default_value': 'true',
},
],
))@
@(SNIPPET(
Expand Down Expand Up @@ -67,15 +85,21 @@ Generated at @ESCAPE(now_str) from template '@ESCAPE(template_name)'</descriptio
' export COMMIT_ARG="--commit"',
'fi',
'export PYTHONPATH=$WORKSPACE/reprepro-updater/src:$PYTHONPATH',
'echo "# BEGIN SUBSECTION: import debian packages for ubuntu_building"',
'python3 -u $WORKSPACE/reprepro-updater/scripts/import_upstream.py ubuntu_building $config_file $COMMIT_ARG',
'echo "# END SUBSECTION"',
'echo "# BEGIN SUBSECTION: import debian packages for ubuntu_testing"',
'python3 -u $WORKSPACE/reprepro-updater/scripts/import_upstream.py ubuntu_testing $config_file $COMMIT_ARG',
'echo "# END SUBSECTION"',
'echo "# BEGIN SUBSECTION: import debian packages for ubuntu_main"',
'python3 -u $WORKSPACE/reprepro-updater/scripts/import_upstream.py ubuntu_main $config_file $COMMIT_ARG',
'echo "# END SUBSECTION"',
'if [ "$IMPORT_TO_BUILDING" = "true" ]; then',
' echo "# BEGIN SUBSECTION: import debian packages for ubuntu_building"',
' python3 -u $WORKSPACE/reprepro-updater/scripts/import_upstream.py ubuntu_building $config_file $COMMIT_ARG',
' echo "# END SUBSECTION"',
'fi',
'if [ "$IMPORT_TO_TESTING" = "true" ]; then',
' echo "# BEGIN SUBSECTION: import debian packages for ubuntu_testing"',
' python3 -u $WORKSPACE/reprepro-updater/scripts/import_upstream.py ubuntu_testing $config_file $COMMIT_ARG',
' echo "# END SUBSECTION"',
'fi',
'if [ "$IMPORT_TO_MAIN" = "true" ]; then',
' echo "# BEGIN SUBSECTION: import debian packages for ubuntu_main"',
' python3 -u $WORKSPACE/reprepro-updater/scripts/import_upstream.py ubuntu_main $config_file $COMMIT_ARG',
' echo "# END SUBSECTION"',
'fi',
'echo "# END SECTION"',
]),
))@
Expand Down

0 comments on commit bf7fc47

Please sign in to comment.