zuul-jobs/test-playbooks/dhall/setup-project.yaml
Tristan Cacqueray 4903ecd30b dhall-diff: add new job
This change adds a new dhall-diff job to verify generated config
is idempotent.

Change-Id: I96a335dc78c4fa74564b854997433e5be0b5e633
2020-05-03 19:06:37 +00:00

24 lines
735 B
YAML

- hosts: all
tasks:
- name: Setup files
copy:
content: "{{ item.content }}"
dest: "{{ zuul.project.src_dir }}/{{ item.dest }}"
loop:
- content: "all:\n\tdhall-to-yaml < test.dhall > test.yaml"
dest: Makefile
- content: "21 + 21"
dest: test.dhall
- content: "42\n"
dest: test.yaml
- name: Commit changes
shell: |
if ! test -f ~/.gitconfig && ! test -d ~/.config/git ; then
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
fi
git add Makefile test.dhall test.yaml && git commit -m "test content"
args:
chdir: "{{ zuul.project.src_dir }}"