Add job deletion. Use s3 credentials when calling jenkinsherder.

This commit is contained in:
Syd Polk 2015-09-14 14:59:06 -05:00
Родитель 5fa64da2f0
Коммит dd8daea18f
2 изменённых файлов: 25 добавлений и 1 удалений

24
delete_jobs.py Normal file
Просмотреть файл

@ -0,0 +1,24 @@
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import argparse
import jenkins
import sys
parser = argparse.ArgumentParser(description='Delete jobs in a jenkins instance')
parser.add_argument('--regexp', required=True)
parser.add_argument('--jenkins-host', required=True, dest='host')
args = parser.parse_args(sys.argv[1:])
jenkins_instance = jenkins.Jenkins(args.host)
jobs = jenkins_instance.get_job_info_regex(args.regexp)
for job in jobs:
print 'Deleting %s...' % job['name']
jenkins_instance.delete_job(job['name'])
print 'Done.'

Просмотреть файл

@ -130,7 +130,7 @@ if [ "$PACKAGE1" != "$PACKAGE2" ] ; then
curl XXURL2XX/$BUILD_FILE2 > $BUILD_FILE2
fi
python `pwd`/mozplatformqa-jenkins/jenkinsherder.py --steeplechase `pwd`/steeplechase/steeplechase/runsteeplechase.py --package $PACKAGE1 --package2 $PACKAGE2 --save-logs-to `pwd`/logs --specialpowers-path /home/mozilla/firefoxes/XXXTESTSRELEASEXXX/linux64/tests/steeplechase/specialpowers --prefs-file /home/mozilla/firefoxes/XXXTESTSRELEASEXXX/linux64/tests/steeplechase/prefs_general.js --signalling-server $XXXSIGSERVERXXX --html-manifest /home/mozilla/firefoxes/XXXTESTSRELEASEXXX/linux64/tests/steeplechase/tests/dom/media/tests/mochitest/steeplechase.ini --host1 $MACHINE1:20701 --arch1 $ARCH1 --host2 $MACHINE2:20701 --arch2 $ARCH2 --os1 $OS1 --os2 $OS2 --treeherder-url $TREEHERDER_URL --treeherder-credentials-path $TREEHERDER_CREDENTIALS
python `pwd`/mozplatformqa-jenkins/jenkinsherder.py --steeplechase `pwd`/steeplechase/steeplechase/runsteeplechase.py --package $PACKAGE1 --package2 $PACKAGE2 --save-logs-to `pwd`/logs --specialpowers-path /home/mozilla/firefoxes/XXXTESTSRELEASEXXX/linux64/tests/steeplechase/specialpowers --prefs-file /home/mozilla/firefoxes/XXXTESTSRELEASEXXX/linux64/tests/steeplechase/prefs_general.js --signalling-server $XXXSIGSERVERXXX --html-manifest /home/mozilla/firefoxes/XXXTESTSRELEASEXXX/linux64/tests/steeplechase/tests/dom/media/tests/mochitest/steeplechase.ini --host1 $MACHINE1:20701 --arch1 $ARCH1 --host2 $MACHINE2:20701 --arch2 $ARCH2 --os1 $OS1 --os2 $OS2 --treeherder-url $TREEHERDER_URL --treeherder-credentials-path $TREEHERDER_CREDENTIALS --s3-credentials-path $S3_CREDENTIALS
</command>
</hudson.tasks.Shell>
</builders>