/
run.yaml
55 lines (50 loc) · 1.74 KB
/
run.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
- hosts: all
tasks:
- name: Run make rpm for RHEL-8
when:
- ansible_distribution_major_version|int <= 8
- ansible_distribution == "RedHat"
shell:
cmd: |
export DIST="{{ dist | default('el7') }}"
export MOCK_CONFIG="{{ mock_config | default('epel-7-x86_64') }}"
make rpm
chdir: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/ceph/ceph-ansible'].src_dir }}"
changed_when: true
- name: Run make rpm for CentOS-8
when:
- ansible_distribution_major_version|int >= 8
- ansible_distribution == "CentOS"
shell:
cmd: |
make rpm
chdir: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/ceph/ceph-ansible'].src_dir }}"
changed_when: true
- name: Build rpm for ansible
when:
- build_ansible_rpm|default(false)|bool
import_tasks: ../ansible/build-ansible-rpm.yaml
- name: Setup log path fact
include_role:
name: set-zuul-log-path-fact
- name: Define buildset artifacts location
zuul_return:
data:
buildset_artifacts_url: "https://logserver.rdoproject.org/{{ zuul_log_path }}/buildset"
- name: Copy logs to logs directory
changed_when: true
shell:
cmd: |
mkdir logs
cp *.log logs
cp *.rpm logs
{% if build_ansible_rpm|default(false)|bool %}
cp {{ ansible_user_dir }}/{{ zuul.projects['github.com/ansible/ansible'].src_dir }}/rpm-build/*.rpm logs
{% endif %}
pushd logs
createrepo .
popd
chdir: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/ceph/ceph-ansible'].src_dir }}"
args:
warn: false