Add ensure-skopeo role
Role copied and modified from ensure-podman As focal doesn't exist for project atomic ppa [1] Install is performed from opensuse repository only [1] http://ppa.launchpad.net/projectatomic/ppa/ubuntu/dists/ Change-Id: I72fc2e68768664b80c39bd47295330131337d8b5
This commit is contained in:
parent
0fcc5ff5ac
commit
b517747623
@ -9,6 +9,7 @@ Container Roles
|
|||||||
.. zuul:autorole:: ensure-kubernetes
|
.. zuul:autorole:: ensure-kubernetes
|
||||||
.. zuul:autorole:: ensure-openshift
|
.. zuul:autorole:: ensure-openshift
|
||||||
.. zuul:autorole:: ensure-podman
|
.. zuul:autorole:: ensure-podman
|
||||||
|
.. zuul:autorole:: ensure-skopeo
|
||||||
.. zuul:autorole:: pause-buildset-registry
|
.. zuul:autorole:: pause-buildset-registry
|
||||||
.. zuul:autorole:: promote-docker-image
|
.. zuul:autorole:: promote-docker-image
|
||||||
.. zuul:autorole:: pull-from-intermediate-registry
|
.. zuul:autorole:: pull-from-intermediate-registry
|
||||||
|
1
roles/ensure-skopeo/README.rst
Normal file
1
roles/ensure-skopeo/README.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
Install skopeo
|
4
roles/ensure-skopeo/tasks/RedHat.yaml
Normal file
4
roles/ensure-skopeo/tasks/RedHat.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: Install skopeo (RedHat)
|
||||||
|
become: true
|
||||||
|
package:
|
||||||
|
name: skopeo
|
16
roles/ensure-skopeo/tasks/Ubuntu-20.04.yaml
Normal file
16
roles/ensure-skopeo/tasks/Ubuntu-20.04.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
- name: Add all repositories
|
||||||
|
include_role:
|
||||||
|
name: ensure-package-repositories
|
||||||
|
vars:
|
||||||
|
repositories_keys:
|
||||||
|
- url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/Release.key"
|
||||||
|
repositories_list:
|
||||||
|
- repo: "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/ /"
|
||||||
|
|
||||||
|
- name: Install skopeo
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- skopeo
|
||||||
|
- uidmap
|
||||||
|
state: present
|
||||||
|
become: yes
|
17
roles/ensure-skopeo/tasks/Ubuntu.yaml
Normal file
17
roles/ensure-skopeo/tasks/Ubuntu.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
- name: Add all repositories
|
||||||
|
include_role:
|
||||||
|
name: ensure-package-repositories
|
||||||
|
vars:
|
||||||
|
repositories_keys:
|
||||||
|
- url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/Release.key"
|
||||||
|
repositories_list:
|
||||||
|
- repo: ppa:projectatomic/ppa
|
||||||
|
- repo: "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_{{ ansible_distribution_version }}/ /"
|
||||||
|
|
||||||
|
- name: Install skopeo
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- skopeo
|
||||||
|
- uidmap
|
||||||
|
state: present
|
||||||
|
become: yes
|
3
roles/ensure-skopeo/tasks/default.yaml
Normal file
3
roles/ensure-skopeo/tasks/default.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- name: Not implemented
|
||||||
|
fail:
|
||||||
|
msg: Role not implemented on this platform yet
|
10
roles/ensure-skopeo/tasks/main.yaml
Normal file
10
roles/ensure-skopeo/tasks/main.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
- name: Find distribution installation
|
||||||
|
include_tasks: "{{ zj_distro_os }}"
|
||||||
|
with_first_found:
|
||||||
|
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
||||||
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||||
|
- "{{ ansible_distribution }}.yaml"
|
||||||
|
- "{{ ansible_os_family }}.yaml"
|
||||||
|
- "default.yaml"
|
||||||
|
loop_control:
|
||||||
|
loop_var: zj_distro_os
|
14
test-playbooks/ensure-skopeo/main.yaml
Normal file
14
test-playbooks/ensure-skopeo/main.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- ensure-skopeo
|
||||||
|
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: Exercise skopeo
|
||||||
|
command: /usr/bin/skopeo -v
|
||||||
|
register: output
|
||||||
|
|
||||||
|
- name: Debug output
|
||||||
|
debug:
|
||||||
|
msg: '{{ output.stdout }}'
|
@ -367,6 +367,21 @@
|
|||||||
- test-playbooks/ensure-podman/.*
|
- test-playbooks/ensure-podman/.*
|
||||||
run: test-playbooks/ensure-podman/main.yaml
|
run: test-playbooks/ensure-podman/main.yaml
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: zuul-jobs-test-ensure-skopeo
|
||||||
|
description: |
|
||||||
|
Test the ensure-skopeo role
|
||||||
|
|
||||||
|
This job tests the ensure-skopeo role. It is not meant to be
|
||||||
|
used directly but rather run on changes to roles in the
|
||||||
|
zuul-jobs repo.
|
||||||
|
abstract: true
|
||||||
|
files:
|
||||||
|
- roles/ensure-skopeo/.*
|
||||||
|
- roles/ensure-package-repositories/.*
|
||||||
|
- test-playbooks/ensure-skopeo/.*
|
||||||
|
run: test-playbooks/ensure-skopeo/main.yaml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zuul-jobs-test-ensure-podman-centos-8
|
name: zuul-jobs-test-ensure-podman-centos-8
|
||||||
description: Tests ensure-podman role on centos-8
|
description: Tests ensure-podman role on centos-8
|
||||||
@ -394,6 +409,42 @@
|
|||||||
- name: ubuntu-bionic
|
- name: ubuntu-bionic
|
||||||
label: ubuntu-bionic
|
label: ubuntu-bionic
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: zuul-jobs-test-ensure-skopeo-centos-8
|
||||||
|
description: Tests ensure-skopeo role on centos-8
|
||||||
|
parent: zuul-jobs-test-ensure-skopeo
|
||||||
|
nodeset:
|
||||||
|
nodes:
|
||||||
|
- name: centos-8
|
||||||
|
label: centos-8
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: zuul-jobs-test-ensure-skopeo-fedora-32
|
||||||
|
description: Tests ensure-skopeo role on fedora-32
|
||||||
|
parent: zuul-jobs-test-ensure-skopeo
|
||||||
|
nodeset:
|
||||||
|
nodes:
|
||||||
|
- name: fedora-32
|
||||||
|
label: fedora-32
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: zuul-jobs-test-ensure-skopeo-ubuntu-bionic
|
||||||
|
description: Tests ensure-skopeo role on ubuntu-bionic
|
||||||
|
parent: zuul-jobs-test-ensure-skopeo
|
||||||
|
nodeset:
|
||||||
|
nodes:
|
||||||
|
- name: ubuntu-bionic
|
||||||
|
label: ubuntu-bionic
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: zuul-jobs-test-ensure-skopeo-ubuntu-focal
|
||||||
|
description: Tests ensure-skopeo role on ubuntu-focal
|
||||||
|
parent: zuul-jobs-test-ensure-skopeo
|
||||||
|
nodeset:
|
||||||
|
nodes:
|
||||||
|
- name: ubuntu-focal
|
||||||
|
label: ubuntu-focal
|
||||||
|
|
||||||
# -* AUTOGENERATED *-
|
# -* AUTOGENERATED *-
|
||||||
# The following project section is autogenerated by
|
# The following project section is autogenerated by
|
||||||
# tox -e update-test-platforms
|
# tox -e update-test-platforms
|
||||||
@ -422,6 +473,10 @@
|
|||||||
- zuul-jobs-test-ensure-podman-centos-8
|
- zuul-jobs-test-ensure-podman-centos-8
|
||||||
- zuul-jobs-test-ensure-podman-fedora-32
|
- zuul-jobs-test-ensure-podman-fedora-32
|
||||||
- zuul-jobs-test-ensure-podman-ubuntu-bionic
|
- zuul-jobs-test-ensure-podman-ubuntu-bionic
|
||||||
|
- zuul-jobs-test-ensure-skopeo-centos-8
|
||||||
|
- zuul-jobs-test-ensure-skopeo-fedora-32
|
||||||
|
- zuul-jobs-test-ensure-skopeo-ubuntu-bionic
|
||||||
|
- zuul-jobs-test-ensure-skopeo-ubuntu-focal
|
||||||
gate:
|
gate:
|
||||||
jobs: *id001
|
jobs: *id001
|
||||||
periodic-weekly:
|
periodic-weekly:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user