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:
parent
3acb6d2a24
commit
614995a9e1
24
.travis.yml
24
.travis.yml
|
@ -2,28 +2,40 @@ language: python
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- DIST=fedora30
|
- DIST=fedora30
|
||||||
- DIST=fedoradev
|
- DIST=fedoradev
|
||||||
- DIST=opensuselp15
|
- DIST=opensuselp15
|
||||||
- DIST=opensusetw
|
- 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
|
# the python here is basically no-op just used for coveralls
|
||||||
python:
|
python:
|
||||||
- "3.6"
|
- "3.6"
|
||||||
|
|
||||||
before_install:
|
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:
|
install:
|
||||||
- pip install coveralls
|
- pip install coveralls
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- docker run -v $(pwd):/usr/src/rpmlint/ $DIST python3 setup.py test
|
- podman build -t $DIST -f test/Dockerfile-$DIST .
|
||||||
- docker run -v $(pwd):/usr/src/rpmlint/ $DIST flake8
|
- podman run -v $(pwd):/usr/src/rpmlint/ $DIST python3 setup.py test
|
||||||
|
- podman run -v $(pwd):/usr/src/rpmlint/ $DIST flake8
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- coverage combine
|
- coverage combine
|
||||||
|
|
|
@ -39,15 +39,15 @@ Optional:
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
### Docker
|
### 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
|
to provide the environment for you. There are various distribution
|
||||||
dockerfiles in `test/` folder.
|
dockerfiles in `test/` folder.
|
||||||
|
|
||||||
I.e. if you want to test on the latest openSUSE you can test using the following commands:
|
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
|
### Directly
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue