Merge pull request #2649 from nilxam/add_alternative_project

Enabling for openSUSE:Leap:15.3:Update:Respin
This commit is contained in:
Max Lin 2021-09-25 02:34:59 +08:00 committed by GitHub
commit 391bef8780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 95 additions and 6 deletions

View File

@ -109,6 +109,29 @@ pipelines:
tasks: tasks:
- script: python3 ./skippkg-finder.py -A https://api.opensuse.org -o openSUSE:Leap:15.4 -s SUSE:SLE-15-SP4:GA - script: python3 ./skippkg-finder.py -A https://api.opensuse.org -o openSUSE:Leap:15.4 -s SUSE:SLE-15-SP4:GA
- script: python3 ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Leap:15.4 -s target - script: python3 ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Leap:15.4 -s target
Pkglistgen.openSUSE_Leap_15.3_Update_Respin:
group: Leap.pkglistgen
lock_behavior: unlockWhenFinished
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
timer:
spec: 0 40 * ? * *
only_on_changes: false
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- pkglistgen:
approval:
type: manual
jobs:
openSUSE_Leap_15.3_Update_Respin_target:
resources:
- repo-checker
tasks:
- script: python3 ./skippkg-finder.py -A https://api.opensuse.org -o openSUSE:Leap:15.3:Update:Respin -t openSUSE:Leap:15.3:Update -s SUSE:SLE-15-SP3:Update
- script: python3 ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Leap:15.3:Update:Respin -s target
Update.Repos.Leap: Update.Repos.Leap:
group: Leap.pkglistgen group: Leap.pkglistgen
lock_behavior: unlockWhenFinished lock_behavior: unlockWhenFinished
@ -130,3 +153,8 @@ pipelines:
- repo-checker - repo-checker
tasks: tasks:
- script: python3 ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Leap:15.4 - script: python3 ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Leap:15.4
openSUSE_Leap_15.3_Update_Respin:
resources:
- repo-checker
tasks:
- script: python3 ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Leap:15.3:Update:Respin

View File

@ -84,6 +84,38 @@ pipelines:
- script: python3 ./skippkg-finder.py -A https://api.opensuse.org -o openSUSE:Leap:15.4 -s SUSE:SLE-15-SP4:GA - script: python3 ./skippkg-finder.py -A https://api.opensuse.org -o openSUSE:Leap:15.4 -s SUSE:SLE-15-SP4:GA
- script: python3 ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p <%= project[0] %><%= options %> - script: python3 ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p <%= project[0] %><%= options %>
<% end -%> <% end -%>
Pkglistgen.openSUSE_Leap_15.3_Update_Respin:
group: Leap.pkglistgen
lock_behavior: unlockWhenFinished
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
timer:
spec: 0 40 * ? * *
only_on_changes: false
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
stages:
- pkglistgen:
approval:
type: manual
jobs:
<% ['openSUSE:Leap:15.3:Update:Respin/target'].each do |project|
project=project.split('/')
name=project[0].gsub(':', '_')
if project.size > 1
options=" -s #{project[1]}"
name = name + "_#{project[1]}"
end
-%>
<%= name %>:
resources:
- repo-checker
tasks:
- script: python3 ./skippkg-finder.py -A https://api.opensuse.org -o openSUSE:Leap:15.3:Update:Respin -t openSUSE:Leap:15.3:Update -s SUSE:SLE-15-SP3:Update
- script: python3 ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p <%= project[0] %><%= options %>
<% end -%>
Update.Repos.Leap: Update.Repos.Leap:
group: Leap.pkglistgen group: Leap.pkglistgen
lock_behavior: unlockWhenFinished lock_behavior: unlockWhenFinished
@ -100,7 +132,7 @@ pipelines:
approval: approval:
type: manual type: manual
jobs: jobs:
<% %w(openSUSE:Leap:15.4).each do |project| -%> <% %w(openSUSE:Leap:15.4 openSUSE:Leap:15.3:Update:Respin).each do |project| -%>
<%= project.gsub(':', '_') %>: <%= project.gsub(':', '_') %>:
resources: resources:
- repo-checker - repo-checker

View File

@ -231,6 +231,27 @@ pipelines:
- script: |- - script: |-
install -D /home/go/config/openqa-client.conf /home/go/.config/openqa/client.conf install -D /home/go/config/openqa-client.conf /home/go/.config/openqa/client.conf
scripts/totest-manager.py -A https://api.opensuse.org --debug run openSUSE:Leap:15.3:WSL scripts/totest-manager.py -A https://api.opensuse.org --debug run openSUSE:Leap:15.3:WSL
TTM.Leap_15.3_Update_Respin:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-totest-manager
materials:
script:
git: https://github.com/openSUSE/openSUSE-release-tools.git
destination: scripts
timer:
spec: 0 */15 * ? * *
only_on_changes: false
stages:
- Run:
approval: manual
resources:
- staging-bot
tasks:
- script: |-
install -D /home/go/config/openqa-client.conf /home/go/.config/openqa/client.conf
scripts/totest-manager.py -A https://api.opensuse.org --debug run openSUSE:Leap:15.3:Update:Respin
TTM.Leap_15.4: TTM.Leap_15.4:
group: openSUSE.Checkers group: openSUSE.Checkers
lock_behavior: unlockWhenFinished lock_behavior: unlockWhenFinished

View File

@ -12,6 +12,7 @@ pipelines:
openSUSE:Leap:15.3:ARM:Images openSUSE:Leap:15.3:ARM:Images
openSUSE:Leap:15.3:Images openSUSE:Leap:15.3:Images
openSUSE:Leap:15.3:WSL openSUSE:Leap:15.3:WSL
openSUSE:Leap:15.3:Update:Respin
openSUSE:Leap:15.4 openSUSE:Leap:15.4
) -%> ) -%>
TTM.<%= project.gsub('openSUSE:', '').gsub(':', '_') %>: TTM.<%= project.gsub('openSUSE:', '').gsub(':', '_') %>:

View File

@ -25,15 +25,18 @@ DEFAULT_REPOSITORY = 'standard'
META_PACKAGE = '000package-groups' META_PACKAGE = '000package-groups'
class SkippkgFinder(object): class SkippkgFinder(object):
def __init__(self, opensuse_project, sle_project, print_only, verbose): def __init__(self, opensuse_project, sle_project, alternative_project, print_only, verbose):
self.upload_project = opensuse_project
self.opensuse_project = opensuse_project self.opensuse_project = opensuse_project
if alternative_project:
self.opensuse_project = alternative_project
self.sle_project = sle_project self.sle_project = sle_project
self.print_only = print_only self.print_only = print_only
self.verbose = verbose self.verbose = verbose
self.apiurl = osc.conf.config['apiurl'] self.apiurl = osc.conf.config['apiurl']
self.debug = osc.conf.config['debug'] self.debug = osc.conf.config['debug']
config = Config.get(self.apiurl, self.opensuse_project) config = Config.get(self.apiurl, opensuse_project)
# binary rpms of packages from `skippkg-finder-skiplist-ignores` # binary rpms of packages from `skippkg-finder-skiplist-ignores`
# be found in the `package_binaries` thus format must to be like # be found in the `package_binaries` thus format must to be like
# SUSE:SLE-15:Update_libcdio.12032, PROJECT-NAME_PACKAGE-NAME # SUSE:SLE-15:Update_libcdio.12032, PROJECT-NAME_PACKAGE-NAME
@ -128,7 +131,9 @@ class SkippkgFinder(object):
pkgname.startswith('patchinfo.') or\ pkgname.startswith('patchinfo.') or\
pkgname.startswith('skelcd-') or\ pkgname.startswith('skelcd-') or\
pkgname.startswith('installation-images') or\ pkgname.startswith('installation-images') or\
pkgname.endswith('-mini'): pkgname.startswith('Leap-release') or\
pkgname.endswith('-mini') or\
'-mini.' in pkgname:
continue continue
# Ugly hack for package has dot in source package name # Ugly hack for package has dot in source package name
# eg. go1.x incidents as the name would be go1.x.xxx # eg. go1.x incidents as the name would be go1.x.xxx
@ -315,7 +320,7 @@ class SkippkgFinder(object):
attr = {'name': pkg} attr = {'name': pkg}
ET.SubElement(packagelist, 'package', attr) ET.SubElement(packagelist, 'package', attr)
if not self.print_only: if not self.print_only:
source_file_ensure(self.apiurl, self.opensuse_project, META_PACKAGE, 'NON_FTP_PACKAGES.group', source_file_ensure(self.apiurl, self.upload_project, META_PACKAGE, 'NON_FTP_PACKAGES.group',
ET.tostring(skip_list, pretty_print=True, encoding='unicode'), ET.tostring(skip_list, pretty_print=True, encoding='unicode'),
'Update the skip list') 'Update the skip list')
else: else:
@ -331,7 +336,7 @@ def main(args):
print("Please pass --opensuse-project and --sle-project argument. See usage with --help.") print("Please pass --opensuse-project and --sle-project argument. See usage with --help.")
quit() quit()
uc = SkippkgFinder(args.opensuse_project, args.sle_project, args.print_only, args.verbose) uc = SkippkgFinder(args.opensuse_project, args.sle_project, args.alternative_project, args.print_only, args.verbose)
uc.crawl() uc.crawl()
@ -346,6 +351,8 @@ if __name__ == '__main__':
help='openSUSE project on buildservice') help='openSUSE project on buildservice')
parser.add_argument('-s', '--sle-project', dest='sle_project', metavar='SLE_PROJECT', parser.add_argument('-s', '--sle-project', dest='sle_project', metavar='SLE_PROJECT',
help='SLE project on buildservice') help='SLE project on buildservice')
parser.add_argument('-t', '--alternative-project', dest='alternative_project', metavar='ALTERNATIVE_PROJECT',
help='check the given project instead of OPENSUSE_PROJECT')
parser.add_argument('-p', '--print-only', action='store_true', parser.add_argument('-p', '--print-only', action='store_true',
help='show the result instead of the uploading') help='show the result instead of the uploading')
parser.add_argument('-v', '--verbose', action='store_true', parser.add_argument('-v', '--verbose', action='store_true',