Merge pull request #2033 from coolo/run_monitors_in_python3
Run source and repo checker in python3
This commit is contained in:
commit
6dce9a79fc
16
ReviewBot.py
16
ReviewBot.py
@ -1,6 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from __future__ import print_function
|
||||
#!/usr/bin/python3
|
||||
|
||||
from pprint import pprint
|
||||
import os, sys, re
|
||||
@ -30,17 +28,7 @@ except ImportError:
|
||||
|
||||
from osc import conf
|
||||
import osc.core
|
||||
try:
|
||||
from urllib.error import HTTPError, URLError
|
||||
except ImportError:
|
||||
# python 2.x
|
||||
from urllib2 import HTTPError, URLError
|
||||
|
||||
try:
|
||||
import __builtin__
|
||||
input = getattr(__builtin__, 'raw_input')
|
||||
except (ImportError, AttributeError):
|
||||
pass
|
||||
from urllib.error import HTTPError, URLError
|
||||
|
||||
from itertools import count
|
||||
|
||||
|
20
ToolBase.py
20
ToolBase.py
@ -1,6 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from __future__ import print_function
|
||||
#!/usr/bin/python3
|
||||
|
||||
from xml.etree import cElementTree as ET
|
||||
import cmdln
|
||||
@ -11,13 +9,9 @@ import signal
|
||||
import sys
|
||||
import time
|
||||
|
||||
try:
|
||||
from urllib.error import HTTPError
|
||||
from urllib.parse import quote_plus
|
||||
except ImportError:
|
||||
# python 2.x
|
||||
from urllib2 import HTTPError
|
||||
from urllib import quote_plus
|
||||
from urllib.error import HTTPError
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
import osc.conf
|
||||
import osc.core
|
||||
|
||||
@ -29,12 +23,6 @@ http_GET = osc.core.http_GET
|
||||
http_DELETE = osc.core.http_DELETE
|
||||
http_POST = osc.core.http_POST
|
||||
|
||||
try:
|
||||
import __builtin__
|
||||
input = getattr(__builtin__, 'raw_input')
|
||||
except (ImportError, AttributeError):
|
||||
pass
|
||||
|
||||
# http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python
|
||||
def chunks(l, n):
|
||||
""" Yield successive n-sized chunks from l.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import re
|
||||
@ -17,11 +17,7 @@ from osclib.conf import Config
|
||||
from osclib.core import devel_project_get
|
||||
from osclib.core import devel_project_fallback
|
||||
from osclib.core import group_members
|
||||
try:
|
||||
from urllib.error import HTTPError
|
||||
except ImportError:
|
||||
# python 2.x
|
||||
from urllib2 import HTTPError
|
||||
from urllib.error import HTTPError
|
||||
|
||||
import ReviewBot
|
||||
from osclib.conf import str2bool
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
from pprint import pprint
|
||||
import os, sys, re
|
||||
@ -13,11 +13,7 @@ except ImportError:
|
||||
|
||||
import osc.conf
|
||||
import osc.core
|
||||
try:
|
||||
from urllib.error import HTTPError, URLError
|
||||
except ImportError:
|
||||
# python 2.x
|
||||
from urllib2 import HTTPError, URLError
|
||||
from urllib.error import HTTPError, URLError
|
||||
|
||||
import yaml
|
||||
import ReviewBot
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
@ -11,17 +11,7 @@ try:
|
||||
except ImportError:
|
||||
import cElementTree as ET
|
||||
|
||||
try:
|
||||
from urllib.error import HTTPError
|
||||
except ImportError:
|
||||
# python 2.x
|
||||
from urllib2 import HTTPError
|
||||
|
||||
try:
|
||||
from urllib.error import URLError
|
||||
except ImportError:
|
||||
# python 2.x
|
||||
from urllib2 import URLError
|
||||
from urllib.error import HTTPError, URLError
|
||||
|
||||
import ReviewBot
|
||||
|
||||
|
44
gocd/checkers.opensuse.gocd.yaml
Normal file
44
gocd/checkers.opensuse.gocd.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
format_version: 3
|
||||
pipelines:
|
||||
openSUSE.Source.Check:
|
||||
group: openSUSE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
timer:
|
||||
spec: 0 */5 * ? * *
|
||||
environment_variables:
|
||||
OSC_CONFIG: /home/go/config/oscrc-factory-auto
|
||||
materials:
|
||||
git:
|
||||
git: https://github.com/openSUSE/openSUSE-release-tools.git
|
||||
stages:
|
||||
- Run:
|
||||
approval:
|
||||
type: manual
|
||||
jobs:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: ./check_source.py -A https://api.opensuse.org --verbose --skip-add-reviews --group factory-auto review
|
||||
openSUSE.Repochecker:
|
||||
group: openSUSE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
timer:
|
||||
spec: 0 0 * ? * *
|
||||
environment_variables:
|
||||
OSC_CONFIG: /home/go/config/oscrc-repo-checker
|
||||
materials:
|
||||
git:
|
||||
git: https://github.com/openSUSE/openSUSE-release-tools.git
|
||||
stages:
|
||||
- Run:
|
||||
approval:
|
||||
type: manual
|
||||
jobs:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: ./repo_checker.py -A https://api.opensuse.org --debug review
|
@ -20,7 +20,7 @@ pipelines:
|
||||
resources:
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: python3 ./check_tags_in_requests.py -A https://api.suse.de --verbose --user=sle-changelog-checker --review=accept-onpass --factory=openSUSE.org:openSUSE:Factory review
|
||||
- script: ./check_tags_in_requests.py -A https://api.suse.de --verbose --user=sle-changelog-checker --review=accept-onpass --factory=openSUSE.org:openSUSE:Factory review
|
||||
SLE.Project.Only:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -39,15 +39,15 @@ pipelines:
|
||||
SLE_15_SP1:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-repo_checker -A https://api.suse.de --debug project_only --post-comments SUSE:SLE-15-SP1:GA
|
||||
- script: ./repo_checker.py -A https://api.suse.de --debug project_only --post-comments SUSE:SLE-15-SP1:GA
|
||||
SLE_12_SP5:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-repo_checker -A https://api.suse.de --debug project_only --post-comments SUSE:SLE-12-SP5:GA
|
||||
- script: ./repo_checker.py -A https://api.suse.de --debug project_only --post-comments SUSE:SLE-12-SP5:GA
|
||||
SLE-SP1.Manager42:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -85,9 +85,9 @@ pipelines:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-repo_checker -A https://api.suse.de --debug review
|
||||
- script: ./repo_checker.py -A https://api.suse.de --debug review
|
||||
SLE.Leaper:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -107,7 +107,7 @@ pipelines:
|
||||
resources:
|
||||
- leaper
|
||||
tasks:
|
||||
- script: python3 /usr/bin/osrt-leaper -A https://api.suse.de --group=leaper --user=leaper --verbose --manual-version-updates --manual-maintenance-updates review
|
||||
- script: ./leaper.py -A https://api.suse.de --group=leaper --user=leaper --verbose --manual-version-updates --manual-maintenance-updates review
|
||||
SLE.Staging.Bot.Regular:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -152,9 +152,9 @@ pipelines:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- staging-bot
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-staging-report --debug -A https://api.suse.de -p SUSE:SLE-15-SP1:GA
|
||||
- script: ./staging-report.py --debug -A https://api.suse.de -p SUSE:SLE-15-SP1:GA
|
||||
SLE.Check.Dups:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -173,7 +173,7 @@ pipelines:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- staging-bot
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: /usr/bin/osc -A https://api.suse.de check_dups SUSE:SLE-15-SP1:GA
|
||||
SLE.Source.Check:
|
||||
@ -194,9 +194,9 @@ pipelines:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- staging-bot
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-check_source -A https://api.suse.de --verbose --skip-add-reviews --group factory-auto review
|
||||
- script: ./check_source.py -A https://api.suse.de --verbose --skip-add-reviews --group factory-auto review
|
||||
SLE12.SP5.InstallCheck:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -217,47 +217,47 @@ pipelines:
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s A
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s A
|
||||
Run.B:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s B
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s B
|
||||
Run.C:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s C
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s C
|
||||
Run.D:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s D
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s D
|
||||
Run.H:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s H
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s H
|
||||
Run.S:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s S
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s S
|
||||
Run.V:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s V
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s V
|
||||
Run.Y:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s Y
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s Y
|
||||
|
||||
|
@ -20,7 +20,7 @@ pipelines:
|
||||
resources:
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: python3 ./check_tags_in_requests.py -A https://api.suse.de --verbose --user=sle-changelog-checker --review=accept-onpass --factory=openSUSE.org:openSUSE:Factory review
|
||||
- script: ./check_tags_in_requests.py -A https://api.suse.de --verbose --user=sle-changelog-checker --review=accept-onpass --factory=openSUSE.org:openSUSE:Factory review
|
||||
SLE.Project.Only:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -39,15 +39,15 @@ pipelines:
|
||||
SLE_15_SP1:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-repo_checker -A https://api.suse.de --debug project_only --post-comments SUSE:SLE-15-SP1:GA
|
||||
- script: ./repo_checker.py -A https://api.suse.de --debug project_only --post-comments SUSE:SLE-15-SP1:GA
|
||||
SLE_12_SP5:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-repo_checker -A https://api.suse.de --debug project_only --post-comments SUSE:SLE-12-SP5:GA
|
||||
- script: ./repo_checker.py -A https://api.suse.de --debug project_only --post-comments SUSE:SLE-12-SP5:GA
|
||||
SLE-SP1.Manager42:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -85,9 +85,9 @@ pipelines:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- repo-checker
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-repo_checker -A https://api.suse.de --debug review
|
||||
- script: ./repo_checker.py -A https://api.suse.de --debug review
|
||||
SLE.Leaper:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -107,7 +107,7 @@ pipelines:
|
||||
resources:
|
||||
- leaper
|
||||
tasks:
|
||||
- script: python3 /usr/bin/osrt-leaper -A https://api.suse.de --group=leaper --user=leaper --verbose --manual-version-updates --manual-maintenance-updates review
|
||||
- script: ./leaper.py -A https://api.suse.de --group=leaper --user=leaper --verbose --manual-version-updates --manual-maintenance-updates review
|
||||
SLE.Staging.Bot.Regular:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -152,9 +152,9 @@ pipelines:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- staging-bot
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-staging-report --debug -A https://api.suse.de -p SUSE:SLE-15-SP1:GA
|
||||
- script: ./staging-report.py --debug -A https://api.suse.de -p SUSE:SLE-15-SP1:GA
|
||||
SLE.Check.Dups:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -173,7 +173,7 @@ pipelines:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- staging-bot
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: /usr/bin/osc -A https://api.suse.de check_dups SUSE:SLE-15-SP1:GA
|
||||
SLE.Source.Check:
|
||||
@ -194,9 +194,9 @@ pipelines:
|
||||
Run:
|
||||
timeout: 0
|
||||
resources:
|
||||
- staging-bot
|
||||
- staging-bot3
|
||||
tasks:
|
||||
- script: /usr/bin/osrt-check_source -A https://api.suse.de --verbose --skip-add-reviews --group factory-auto review
|
||||
- script: ./check_source.py -A https://api.suse.de --verbose --skip-add-reviews --group factory-auto review
|
||||
SLE12.SP5.InstallCheck:
|
||||
group: SLE.Checkers
|
||||
lock_behavior: unlockWhenFinished
|
||||
@ -218,5 +218,5 @@ pipelines:
|
||||
resources:
|
||||
- repo-checker3
|
||||
tasks:
|
||||
- script: python3 ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s <%= letter %>
|
||||
- script: ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A https://api.suse.de -s <%= letter %>
|
||||
<% end %>
|
||||
|
@ -1,6 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from __future__ import print_function
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
import bugzilla
|
||||
@ -26,12 +24,6 @@ from osclib.core import package_list
|
||||
from osclib.git import CACHE_DIR
|
||||
from osclib.git import sync
|
||||
|
||||
try:
|
||||
import __builtin__
|
||||
input = getattr(__builtin__, 'raw_input')
|
||||
except (ImportError, AttributeError):
|
||||
pass
|
||||
|
||||
# Issue summary can contain unicode characters and therefore a string containing
|
||||
# either summary or one in which ISSUE_SUMMARY is then placed must be unicode.
|
||||
# For example, translation-update-upstream contains bsc#877707 which has a
|
||||
|
@ -1,18 +1,11 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
from __future__ import print_function
|
||||
import argparse
|
||||
import os
|
||||
from osclib.cache_manager import CacheManager
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
try:
|
||||
import __builtin__
|
||||
input = getattr(__builtin__, 'raw_input')
|
||||
except (ImportError, AttributeError):
|
||||
pass
|
||||
|
||||
CACHE_DIR = CacheManager.directory('k8s-secret')
|
||||
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
from pprint import pprint
|
||||
import os
|
||||
@ -17,11 +17,7 @@ import osc.core
|
||||
from osclib.conf import Config
|
||||
from osclib.core import devel_project_get
|
||||
|
||||
try:
|
||||
from urllib.error import HTTPError
|
||||
except ImportError:
|
||||
# python 2.x
|
||||
from urllib2 import HTTPError
|
||||
from urllib.error import HTTPError
|
||||
|
||||
import yaml
|
||||
import ReviewBot
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
from dateutil.parser import parse as date_parse
|
||||
@ -13,11 +13,7 @@ import osc.core
|
||||
from osc.core import get_commitlog
|
||||
from osc.core import get_request_list
|
||||
|
||||
try:
|
||||
from urllib.error import HTTPError
|
||||
except ImportError:
|
||||
# python 2.x
|
||||
from urllib2 import HTTPError
|
||||
from urllib.error import HTTPError
|
||||
|
||||
import subprocess
|
||||
import time
|
||||
|
@ -1,6 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from __future__ import print_function
|
||||
#!/usr/bin/python3
|
||||
|
||||
import cmdln
|
||||
from collections import namedtuple
|
||||
|
@ -1,6 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from __future__ import print_function
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
from datetime import datetime, timedelta
|
||||
|
Loading…
x
Reference in New Issue
Block a user