share/ansible: convert alpine dockerfile to ansible
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
committed by
Serge Hallyn
parent
1d6f578f3e
commit
80c4e70da0
66
share/ansible/roles/ci_run/tasks/alpine.yml
Normal file
66
share/ansible/roles/ci_run/tasks/alpine.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
# tasks file for ci_run
|
||||
- name: Ensure python is installed
|
||||
ansible.builtin.raw: apk add python3
|
||||
|
||||
- name: Ensure dependencies are installed
|
||||
community.general.apk:
|
||||
name:
|
||||
- autoconf
|
||||
- automake
|
||||
- bash
|
||||
- build-base
|
||||
- byacc
|
||||
- cmocka-dev
|
||||
- expect
|
||||
- gettext-dev
|
||||
- git
|
||||
- libbsd-dev
|
||||
- libeconf-dev
|
||||
- libtool
|
||||
- libxslt
|
||||
- pkgconf
|
||||
state: present
|
||||
|
||||
- name: Build configuration
|
||||
ansible.builtin.command: >
|
||||
./autogen.sh
|
||||
--disable-man
|
||||
--disable-nls
|
||||
--with-yescrypt
|
||||
--without-selinux
|
||||
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"
|
||||
Reference in New Issue
Block a user