share/ansible: move fedora ci_run to its own file
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
committed by
Serge Hallyn
parent
36e8015e2b
commit
9a53a8aebd
@@ -0,0 +1,70 @@
|
||||
---
|
||||
# tasks file for ci_run
|
||||
- name: Ensure dependencies are installed
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- dnf-plugins-core
|
||||
- libcmocka-devel
|
||||
- systemd-devel
|
||||
state: present
|
||||
|
||||
- name: Ensure build dependencies are installed
|
||||
ansible.builtin.command:
|
||||
dnf builddep -y shadow-utils
|
||||
register: dnf_result
|
||||
changed_when: '"Nothing to do" not in dnf_result.stdout'
|
||||
|
||||
- name: Build configuration
|
||||
ansible.builtin.command: >
|
||||
./autogen.sh
|
||||
--disable-account-tools-setuid
|
||||
--enable-lastlog
|
||||
--enable-logind=no
|
||||
--enable-man
|
||||
--enable-shadowgrp
|
||||
--enable-shared
|
||||
--with-audit
|
||||
--with-bcrypt
|
||||
--with-group-name-max-length=32
|
||||
--with-libpam
|
||||
--with-selinux
|
||||
--with-sha-crypt
|
||||
--with-yescrypt
|
||||
--without-libbsd
|
||||
--without-libcrack
|
||||
--without-sssd
|
||||
args:
|
||||
chdir: /usr/local/src/shadow/
|
||||
ignore_errors: true
|
||||
|
||||
- name: Build
|
||||
ansible.builtin.shell:
|
||||
make -Orecurse -j4 > build.log
|
||||
args:
|
||||
chdir: /usr/local/src/shadow/
|
||||
ignore_errors: true
|
||||
|
||||
- name: Run unit-tests
|
||||
ansible.builtin.command:
|
||||
make check
|
||||
args:
|
||||
chdir: /usr/local/src/shadow/
|
||||
ignore_errors: true
|
||||
|
||||
- name: Install
|
||||
ansible.builtin.command:
|
||||
make install
|
||||
args:
|
||||
chdir: /usr/local/src/shadow/
|
||||
ignore_errors: true
|
||||
|
||||
- name: Copy logs
|
||||
ansible.builtin.fetch:
|
||||
src: '{{ item }}'
|
||||
dest: ./build-out/
|
||||
flat: yes
|
||||
with_items:
|
||||
- "/usr/local/src/shadow/config.log"
|
||||
- "/usr/local/src/shadow/config.h"
|
||||
- "/usr/local/src/shadow/build.log"
|
||||
- "/usr/local/src/shadow/tests/unit/test-suite.log"
|
||||
@@ -1,69 +1,8 @@
|
||||
---
|
||||
# tasks file for ci_run
|
||||
- name: Ensure dependencies are installed
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- dnf-plugins-core
|
||||
- libcmocka-devel
|
||||
- systemd-devel
|
||||
state: present
|
||||
|
||||
- name: Ensure build dependencies are installed
|
||||
ansible.builtin.command:
|
||||
dnf builddep -y shadow-utils
|
||||
register: dnf_result
|
||||
changed_when: '"Nothing to do" not in dnf_result.stdout'
|
||||
|
||||
- name: Build configuration
|
||||
ansible.builtin.command: >
|
||||
./autogen.sh
|
||||
--disable-account-tools-setuid
|
||||
--enable-lastlog
|
||||
--enable-logind=no
|
||||
--enable-man
|
||||
--enable-shadowgrp
|
||||
--enable-shared
|
||||
--with-audit
|
||||
--with-bcrypt
|
||||
--with-group-name-max-length=32
|
||||
--with-libpam
|
||||
--with-selinux
|
||||
--with-sha-crypt
|
||||
--with-yescrypt
|
||||
--without-libbsd
|
||||
--without-libcrack
|
||||
--without-sssd
|
||||
args:
|
||||
chdir: /usr/local/src/shadow/
|
||||
ignore_errors: true
|
||||
|
||||
- name: Build
|
||||
ansible.builtin.shell:
|
||||
make -Orecurse -j4 > build.log
|
||||
args:
|
||||
chdir: /usr/local/src/shadow/
|
||||
ignore_errors: true
|
||||
|
||||
- name: Run unit-tests
|
||||
ansible.builtin.command:
|
||||
make check
|
||||
args:
|
||||
chdir: /usr/local/src/shadow/
|
||||
ignore_errors: true
|
||||
|
||||
- name: Install
|
||||
ansible.builtin.command:
|
||||
make install
|
||||
args:
|
||||
chdir: /usr/local/src/shadow/
|
||||
ignore_errors: true
|
||||
|
||||
- name: Copy shadow repo
|
||||
ansible.builtin.fetch:
|
||||
src: '{{ item }}'
|
||||
dest: ./build-out/
|
||||
with_items:
|
||||
- "/usr/local/src/shadow/config.log"
|
||||
- "/usr/local/src/shadow/config.h"
|
||||
- "/usr/local/src/shadow/build.log"
|
||||
- "/usr/local/src/shadow/tests/unit/test-suite.log"
|
||||
- name: 'Include distribution specific ci_run tasks fedora'
|
||||
include_tasks: '{{ include_file }}'
|
||||
loop_control:
|
||||
loop_var: include_file
|
||||
with_first_found:
|
||||
- files: fedora.yml
|
||||
|
||||
Reference in New Issue
Block a user