Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial customization for reprepro-updater #1080

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

j-rivero
Copy link
Contributor

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 no-parametrize behavior.

Local --dry-run displays:

Updating job 'import_upstream' (dry run)
    <<<
    --- remote config
    +++ new config
    @@ -35,0 +36,15 @@
    +          <defaultValue>true</defaultValue>
    +        </hudson.model.BooleanParameterDefinition>
    +        <hudson.model.BooleanParameterDefinition>
    +          <name>IMPORT_TO_MAIN</name>
    +          <description>Use the ubuntu_main repository as one of the targets for the import</description>
    +          <defaultValue>true</defaultValue>
    +        </hudson.model.BooleanParameterDefinition>
    +        <hudson.model.BooleanParameterDefinition>
    +          <name>IMPORT_TO_TESTING</name>
    +          <description>Use the ubuntu_testing repository as one of the targets for the import</description>
    +          <defaultValue>true</defaultValue>
    +        </hudson.model.BooleanParameterDefinition>
    +        <hudson.model.BooleanParameterDefinition>
    +          <name>IMPORT_TO_BUILDING</name>
    +          <description>Use the ubuntu_building repository as one of the targets for the import</description>
    @@ -94,9 +109,15 @@
    -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
    >>>

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]>
@j-rivero j-rivero merged commit 4a6c695 into master Feb 27, 2025
24 checks passed
@j-rivero j-rivero deleted the jrivero/support_reprepro_per_repo_imports branch February 27, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants