Last active
October 13, 2018 01:47
-
-
Save dmsimard/baa9863e20c84538956715f4fa037963 to your computer and use it in GitHub Desktop.
Zuul actions
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
# 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" |
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
# 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