Skip to content

Instantly share code, notes, and snippets.

@dmsimard dmsimard/aplaybook.yml
Last active Oct 13, 2018

Embed
What would you like to do?
Zuul actions
# Pseudocode
- name: Return job status to Github
github_comment:
org: "{{ org }}" # openstack-infra
repo: "{{ repo }}" # zuul
pr: "{{ pr }}" # 1234
# Maybe jobs could supply their own comments or comment templates
comment: "{{ comment_defined_by_the_job | default('default_job_comment.j2') }}"
# +1, -2, etc
vote: "{{ vote | default(0) }}"
when: connection_driver == "github"
- name: Return job status to Gerrit
gerrit_comment:
project: "{{ project }}" # openstack-infra/zuul
change: "{{ change }}" # 12345
# Maybe jobs could supply their own comments or comment templates
comment: "{{ comment_defined_by_the_job | default('default_job_comment.j2') }}"
# +1, -2, etc
vote: "{{ vote | default(0) }}"
when: connection_driver == "gerrit"
# Pseudocode
# Vars from the inventory are available since everything is in the same Ansible context
Patch Set {{ zuul.change.patchset }}: {{ vote }}
Build {{ (vote >= 1) | ternary("Succeeded","Failed") }} ({{ pipeline }} pipeline).
{% for job in zuul.jobs %}
{{ job.name }} {{ job.status }} in {{ job.duration }}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.