Use podman instead of docker

The podman is the solution on RHEL/SLE and present on Fedora/openSUSE
in a root-less mode.

This adds podman (projectatomic) ppa to be setup before install and
fetches the podman from there (as it is not natively on Ubuntu yet).
This commit is contained in:
Tomáš Chvátal 2019-10-03 13:22:23 +02:00 committed by Neal Gompa (ニール・ゴンパ)
parent 3acb6d2a24
commit 614995a9e1
2 changed files with 21 additions and 9 deletions

View File

@ -2,28 +2,40 @@ language: python
sudo: required
services:
- docker
env:
- DIST=fedora30
- DIST=fedoradev
- DIST=opensuselp15
- DIST=opensusetw
# podman is currently not in Ubuntu
addons:
apt:
update: true
sources:
- sourceline: "ppa:projectatomic/ppa"
packages:
- podman
# the python here is basically no-op just used for coveralls
python:
- "3.6"
before_install:
- docker build -t $DIST -f test/Dockerfile-$DIST .
# 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
install:
- pip install coveralls
script:
- docker run -v $(pwd):/usr/src/rpmlint/ $DIST python3 setup.py test
- docker run -v $(pwd):/usr/src/rpmlint/ $DIST flake8
- podman build -t $DIST -f test/Dockerfile-$DIST .
- podman run -v $(pwd):/usr/src/rpmlint/ $DIST python3 setup.py test
- podman run -v $(pwd):/usr/src/rpmlint/ $DIST flake8
after_success:
- coverage combine

View File

@ -39,15 +39,15 @@ Optional:
## Testing
### Docker
If you want to test the `rpmlint` when developing best is to use docker
If you want to test the `rpmlint` when developing best is to use podman
to provide the environment for you. There are various distribution
dockerfiles in `test/` folder.
I.e. if you want to test on the latest openSUSE you can test using the following commands:
`docker build -t opensusetw -f test/Dockerfile-opensusetw .`
`podman build -t opensusetw -f test/Dockerfile-opensusetw .`
`docker run -v $(pwd):/usr/src/rpmlint/ opensusetw python3 setup.py test`
`podman run -v $(pwd):/usr/src/rpmlint/ opensusetw python3 setup.py test`
### Directly