Run the monitors in python3 containers

This commit is contained in:
Stephan Kulow 2019-05-15 20:32:50 +02:00
parent 5a1b08d81b
commit 9858031bed
3 changed files with 13 additions and 32 deletions

View File

@ -20,7 +20,7 @@ pipelines:
Run:
timeout: 0
resources:
- staging-bot
- staging-bot3
tasks:
- script: |-
export PYTHONPATH=$PWD/scripts
@ -45,7 +45,7 @@ pipelines:
Run:
timeout: 0
resources:
- staging-bot
- staging-bot3
tasks:
# endless loop
- script: |-
@ -63,10 +63,6 @@ pipelines:
git: https://github.com/openSUSE/openSUSE-release-tools.git
branch: master
destination: scripts
osc:
git: https://github.com/openSUSE/osc.git
branch: python3
destination: osc
stages:
- Run:
approval:
@ -75,16 +71,16 @@ pipelines:
Run:
timeout: 0
resources:
- staging-bot
- staging-bot3
tasks:
# endless loop
- script: |-
export PYTHONPATH=$PWD/osc:$PWD/scripts
export PYTHONPATH=$PWD/scripts
git config --global user.email "coolo@suse.de"
git config --global user.name "GoCD Repo Monitor"
git clone git://botmaster.suse.de/suse-repos.git
cd suse-repos
python3 ../scripts/gocd/rabbit-repoid.py -A https://api.suse.de SUSE:SLE-15-SP1:GA
../scripts/gocd/rabbit-repoid.py -A https://api.suse.de SUSE:SLE-15-SP1:GA
openSUSE.Repo.Monitor:
group: Monitors
lock_behavior: unlockWhenFinished
@ -97,10 +93,6 @@ pipelines:
git: https://github.com/openSUSE/openSUSE-release-tools.git
branch: master
destination: scripts
osc:
git: https://github.com/openSUSE/osc.git
branch: python3
destination: osc
stages:
- Run:
approval:
@ -109,13 +101,13 @@ pipelines:
Run:
timeout: 0
resources:
- staging-bot
- staging-bot3
tasks:
# endless loop
- script: |-
export PYTHONPATH=$PWD/osc:$PWD/scripts
export PYTHONPATH=$PWD/scripts
git config --global user.email "coolo@suse.de"
git config --global user.name "GoCD Repo Monitor"
git clone git://botmaster.suse.de/opensuse-repos.git
cd opensuse-repos
python3 ../scripts/gocd/rabbit-repoid.py -A https://api.opensuse.org openSUSE:Factory openSUSE:Leap
../scripts/gocd/rabbit-repoid.py -A https://api.opensuse.org openSUSE:Factory openSUSE:Leap

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
import argparse
import logging
@ -15,18 +15,12 @@ from osclib.stagingapi import StagingAPI
from lxml import etree as ET
from openqa_client.client import OpenQA_Client
from openqa_client.exceptions import ConnectionError
try:
from urllib.error import HTTPError, URLError
from urllib.parse import quote_plus
except ImportError:
# python 2.x
from urllib2 import HTTPError, URLError
from urllib import quote_plus
from urllib.error import HTTPError, URLError
from urllib.parse import quote_plus
import requests
from PubSubConsumer import PubSubConsumer
class Project(object):
def __init__(self, name):
self.name = name

View File

@ -1,4 +1,4 @@
#! /usr/bin/python
#!/usr/bin/python3
from __future__ import print_function
@ -16,12 +16,7 @@ from osc.core import http_GET, makeurl
from osclib.core import target_archs
from lxml import etree as ET
try:
from urllib.error import HTTPError
except ImportError:
# python 2.x
from urllib2 import HTTPError
from urllib.error import HTTPError
from PubSubConsumer import PubSubConsumer
class Listener(PubSubConsumer):