psss / tests / selinux

Forked from tests/selinux 6 years ago
Clone

Blame tests-pr.yml

5aabec5
- hosts: localhost
5aabec5
  tags:
5aabec5
    - classic
5aabec5
5aabec5
  pre_tasks:
5aabec5
    - name: Generate list of tests in this PR
5aabec5
      shell: |
8c1edbd
          git fetch https://src.fedoraproject.org/tests/selinux.git main:upstream-main
8c1edbd
          git log --format= --stat --name-only upstream-main..HEAD | sed '/\//!d;s#\(.*\)/.*#\1#' | sort -u | xargs
5aabec5
      delegate_to: localhost
5aabec5
      register: tests_list
5aabec5
90e8c9e
    - name: Set tests
5aabec5
      set_fact:
5aabec5
        tests: "{{ tests_list.stdout.split(' ') }}"
5aabec5
636cce7
    # Update to the latest kernel to allow installing kernel-* packages
636cce7
    # matching the running kernel version.
636cce7
    # See: https://pagure.io/fedora-ci/general/issue/162
636cce7
    # May be removed once the issue above is resolved.
636cce7
    - name: Update kernel packages and reboot
636cce7
      block:
636cce7
        - name: Update kernel-core
636cce7
          shell: dnf update -y kernel-core
636cce7
636cce7
        - name: Restart host
636cce7
          shell: sleep 2 && shutdown -r now "Ansible updates triggered"
636cce7
          async: 1
636cce7
          poll: 0
636cce7
          ignore_errors: true
636cce7
636cce7
        - name: Wait for host to come back
636cce7
          wait_for_connection:
636cce7
            delay: 10
636cce7
            timeout: 300
636cce7
5aabec5
  roles:
5aabec5
  - role: standard-test-beakerlib
90e8c9e