
This initial playbook and roles builds both CentOS and openSUSE specfiles. The build occurs on OBS and is currently done in a sandbox area in my home project [0]. The job currently just starts the OBS job, it does not currently check the build results, this will come later. This has been tested with fault so far. The zuul template will be added to each repo as specfiles are updated. Added support to automagically build _service files. [0] https://build.opensuse.org/project/subprojects/home:saulwold zuul.d/projects needs to use the stx-zuul-jobs-linters to set ANSIBLE_ROLES_PATH correctly Change-Id: I6490030894b5887f33a55b1e66e374bcd50960d5 Signed-off-by: Saul Wold <sgw@linux.intel.com>
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
- name: Install Centos OSC Command
|
|
block:
|
|
- name: Add OSC Repo
|
|
yum_repository:
|
|
name: opensuse_tools
|
|
description: openSUSE Tools for OSC and OBS
|
|
baseurl: http://download.opensuse.org/repositories/openSUSE:/Tools/CentOS_7
|
|
gpgcheck: no
|
|
|
|
- name: Install OSC
|
|
yum:
|
|
name:
|
|
- build
|
|
- obs-service-obs_scm
|
|
- obs-service-recompress
|
|
- obs-service-tar
|
|
- obs-service-tar_scm
|
|
- osc
|
|
state: present
|
|
when: target_distro == 'centos'
|
|
become: yes
|
|
|
|
- name: Install openSUSE OSC
|
|
block:
|
|
- name: Install OSC
|
|
zypper:
|
|
name:
|
|
- build
|
|
- obs-service-obs_scm
|
|
- obs-service-recompress
|
|
- obs-service-tar
|
|
- obs-service-tar_scm
|
|
- osc
|
|
state: present
|
|
disable_recommends: no
|
|
when: target_distro == 'opensuse'
|
|
become: yes
|
|
|
|
- name: Install Ubuntu OSC Command
|
|
block:
|
|
- name: Add Ubuntu Tools repository key
|
|
apt_key:
|
|
url: "http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_18.10/Release.key"
|
|
|
|
- name: Add Ubuntu Tools repo
|
|
apt_repository:
|
|
repo: "deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_18.10 bionic main"
|
|
state: present
|
|
update_cache: yes
|
|
ignore_errors: yes
|
|
|
|
- name: Update apt cache
|
|
apt:
|
|
update_cache: yes
|
|
ignore_errors: yes
|
|
|
|
- name: Install required software
|
|
package:
|
|
name:
|
|
- software-properties-common
|
|
- osc
|
|
state: present
|
|
when: target_distro == "ubuntu"
|
|
become: yes
|