mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-23 21:35:26 +03:00
579faf92fd
OK so I noticed that something was failing and we were missing `set -xeuo pipefail` in our shells. That of course revealed the ansible tests didn't actually work - my only defense here is spending so much time fighting to get it through CI and trying something new. Anyways, to make the staged-deploy tests work we need a task that actually uses `rpm-ostree override` rather than `usroverlay`. Let's make this a bit saner and have a clean split between tests that are "shell-script+usroverlay" and "ansible+override". Closes: #1577 Approved by: jlebon
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
# This entrypoint right now just runs shell-script based tests
|
|
# from destructive/. Note that we `rpm-ostree usroverlay` git
|
|
# builds. So it's not supported to reboot in these tests.
|
|
# These tests will be run serially, and can e.g. change deployments.
|
|
---
|
|
- hosts: localhost
|
|
tags:
|
|
- atomic
|
|
remote_user: root
|
|
vars:
|
|
use_git_build: True
|
|
tests: "."
|
|
tasks:
|
|
- import_tasks: tasks/query-host.yml
|
|
- set_fact:
|
|
rpmostree_initial_deployment: "{{ rpmostree_status[\"deployments\"][0] }}"
|
|
- import_tasks: tasks/overlay-git.yml
|
|
when: use_git_build
|
|
# Next copy all of the tests/ directory
|
|
- name: Copy test data
|
|
synchronize: src=../../ dest=/root/tests/ archive=yes
|
|
|
|
- find:
|
|
paths: /root/tests/installed/destructive
|
|
patterns: "itest-*.sh"
|
|
register: all_tests
|
|
- set_fact:
|
|
selected_tests: "{{ all_tests.files|map(attribute='path') | select('match', tests) | list }}"
|
|
- assert:
|
|
that:
|
|
- "{{ selected_tests|length }} != 0"
|
|
- file: path=/root/logs state=directory
|
|
- block:
|
|
- name: Run destructive tests
|
|
shell: "{{ item }} &> /root/logs/$(basename {{ item }}).log"
|
|
with_items:
|
|
- "{{ selected_tests }}"
|
|
always:
|
|
- synchronize:
|
|
src: /root/logs/
|
|
dest: artifacts/installed-destructive
|
|
mode: pull
|