-
Notifications
You must be signed in to change notification settings - Fork 19
/
.travis.yml
38 lines (33 loc) · 1.38 KB
/
.travis.yml
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
---
# yamllint disable rule:line-length
language: bash
sudo: required
env:
- distribution: fedora
version: 31
# To install podman.
addons:
apt:
config:
retries: true
update: true
sources:
- sourceline: "ppa:projectatomic/ppa"
# https://github.com/containers/libpod/pull/4584
packages:
- podman
- software-properties-common
- uidmap
- slirp4netns
before_install:
# podman needs a basic register set up (packaging bug in the ppa)
- sudo mkdir -p /etc/containers
- echo -e "[registries.search]\nregistries = ['docker.io']" | sudo tee /etc/containers/registries.conf
# we need to register travis to allow subuid/gid for the rootless execution
- echo "travis:110000:65535" | sudo tee /etc/subuid
- echo "travis:110000:65535" | sudo tee /etc/subgid
- podman pull registry.fedoraproject.org/${distribution}:${version}
script:
- podman build --no-cache --rm --file travis/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible travis
- podman run -v "${PWD}/roles":/etc/ansible/roles:ro --volume="${PWD}/travis":/opt:ro -e ANSIBLE_FORCE_COLOR=1 ${distribution}-${version}:ansible ansible-playbook -v /opt/test.yml --syntax-check
- podman run -v "${PWD}/roles":/etc/ansible/roles:ro --volume="${PWD}/travis":/opt:ro -e ANSIBLE_FORCE_COLOR=1 ${distribution}-${version}:ansible ansible-playbook -v /opt/test.yml