Skip to content

Commit

Permalink
Merge 5408508 into 9b738f2
Browse files Browse the repository at this point in the history
  • Loading branch information
sergsalatsky committed Mar 4, 2020
2 parents 9b738f2 + 5408508 commit 06f56d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
17 changes: 11 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ services:
env:
matrix:
- ACTION=bandit
OS=fedora
OS_VERSION=29
OS=centos
OS_VERSION=7
PYTHON_VERSION=2
ENGINE=docker
- ACTION=bandit
OS=fedora
OS_VERSION=30
OS_VERSION=31
PYTHON_VERSION=3
ENGINE=docker
- OS=centos
OS_VERSION=7
PYTHON_VERSION=2
- OS=fedora
OS_VERSION=29
PYTHON_VERSION=2
ENGINE=docker
- OS=fedora
OS_VERSION=30
PYTHON_VERSION=3
ENGINE=docker
- OS=fedora
OS_VERSION=31
PYTHON_VERSION=3
ENGINE=docker
install:
- pip install coveralls
script:
Expand Down
7 changes: 4 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -eux

# Prepare env vars
ENGINE=${ENGINE:="podman"}
OS=${OS:="centos"}
OS_VERSION=${OS_VERSION:="7"}
PYTHON_VERSION=${PYTHON_VERSION:="2"}
Expand All @@ -13,7 +14,7 @@ if [[ $OS == "fedora" ]]; then
fi

CONTAINER_NAME="koji-containerbuild-$OS-$OS_VERSION-py$PYTHON_VERSION"
RUN="docker exec -ti $CONTAINER_NAME"
RUN="$ENGINE exec -ti $CONTAINER_NAME"
if [[ $OS == "fedora" ]]; then
PIP_PKG="python$PYTHON_VERSION-pip"
PIP="pip$PYTHON_VERSION"
Expand All @@ -31,8 +32,8 @@ else
PYTHON="python"
fi
# Create container if needed
if [[ $(docker ps -q -f name=$CONTAINER_NAME | wc -l) -eq 0 ]]; then
docker run --name $CONTAINER_NAME -d -v $PWD:$PWD:z -w $PWD -ti $IMAGE sleep infinity
if [[ $($ENGINE ps -q -f name="$CONTAINER_NAME" | wc -l) -eq 0 ]]; then
$ENGINE run --name "$CONTAINER_NAME" -d -v "$PWD":"$PWD":z -w "$PWD" -ti "$IMAGE" sleep infinity
fi

# Install dependencies
Expand Down

0 comments on commit 06f56d0

Please sign in to comment.