Skip to content

Instantly share code, notes, and snippets.

@dmsimard
Last active April 23, 2016 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmsimard/4e1344d370c82c8651cc60cf3829968b to your computer and use it in GitHub Desktop.
Save dmsimard/4e1344d370c82c8651cc60cf3829968b to your computer and use it in GitHub Desktop.
#!/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