From 47df9920e5f5efc942cdf138d7fb0016219705aa Mon Sep 17 00:00:00 2001 From: Andrei Stepanov Date: Nov 09 2018 13:02:06 +0000 Subject: Merge #278 `ci: Update the container so it can run integration tests` --- diff --git a/ci/Dockerfile b/ci/Dockerfile index b3fbf0d..41cb2d7 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -1,14 +1,16 @@ -FROM docker.io/centos:latest +FROM docker.io/fedora:29 LABEL maintainer "Andrei Stepanov " -ENV PARAM_WDIR="/var" -RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN sed -i -e '/\[main\]/aip_resolve=4' /etc/yum.conf RUN yum install -y which copr-cli nss_wrapper fedora-packager wget rpmdevtools \ - gcc python34-devel redhat-rpm-config python34 python34-virtualenv python34-pip \ - ansible; \ + gcc python3-devel redhat-rpm-config python3 python3-virtualenv python3-pip \ + ansible python3-fmf; \ yum clean all; \ rm -rf /var/cache/yum +ENV PARAM_WDIR="/work" \ + HOME="/root" WORKDIR "$PARAM_WDIR" VOLUME [$PARAM_WDIR] -RUN chgrp -R 0 "$PARAM_WDIR" && chmod -R g+rwX "$PARAM_WDIR" -USER 1001 +RUN chgrp -R 0 "$PARAM_WDIR" \ + && chmod -R g+rwX "$PARAM_WDIR" \ + && mkdir -p "$HOME" \ + && chmod -R ugo+rwx "$HOME" +USER 0 diff --git a/ci/readme.md b/ci/readme.md index 1c639c4..1de3c02 100644 --- a/ci/readme.md +++ b/ci/readme.md @@ -1,3 +1,14 @@ +# Building and running the container + +The tests run in a container defined here. Build it like so from the top level +standard-test-roles directory: + + $ podman build -t str-tester:latest ci/ + +And to debug issues run it like so, again from the standard test-roles directory: + + $ podman run -ti --rm --volume=$PWD:/work:ro str-tester:latest /bin/bash + # Jenkins configure Job runs at: [Centos OpenShift](https://jenkins-fedora-atomic-process.apps.ci.centos.org/credentials/) diff --git a/tests/python-syntax.sh b/tests/python-syntax.sh index a796932..dd6694d 100755 --- a/tests/python-syntax.sh +++ b/tests/python-syntax.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash -which virtualenv-3 > /dev/null 2>&1 +which virtualenv > /dev/null 2>&1 if [[ $? -ne 0 ]]; then echo "Please install Python 3 package that provides virtualenv-3 cmd before running the test." exit 1 @@ -47,7 +47,7 @@ if [[ -z $virt_env_dir ]]; then exit 1; fi -virtualenv-3 ${virt_env_dir} +virtualenv ${virt_env_dir} source ${virt_env_dir}/bin/activate pip3 install inspektor