Last active
April 23, 2016 00:28
-
-
Save dmsimard/4e1344d370c82c8651cc60cf3829968b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import yaml | |
# Copy/paste from projects.yaml but only after the dist-git update part | |
with open('projects.yaml', 'r') as f: | |
text=f.read() | |
def template(template): | |
print " template:" | |
print " - name: {0}".format(template) | |
errors = [] | |
for project in yaml.load(text): | |
name = project['name'] | |
print "" | |
print "- name: {0}".format(name) | |
if name.endswith('distgit'): | |
if 'puppet' in name and not name.startswith('openstack'): | |
template('puppet-distgit-check-jobs') | |
else: | |
template('package-distgit-check-jobs') | |
else: | |
if 'puppet' in name and not name.startswith('openstack'): | |
template('puppet-check-jobs') | |
else: | |
template('package-check-jobs') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment