#278 ci: Update the container so it can run integration tests
Merged 5 years ago by astepano. Opened 5 years ago by stefw.
stefw/standard-test-roles container-ansible-fedora  into  master

file modified
+10 -8
@@ -1,14 +1,16 @@ 

- FROM docker.io/centos:latest

+ FROM docker.io/fedora:29

  LABEL maintainer "Andrei Stepanov <astepano@redhat.com>"

- 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

file modified
+11
@@ -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/)

file modified
+2 -2
@@ -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 @@ 

      exit 1;

  fi

  

- virtualenv-3 ${virt_env_dir}

+ virtualenv ${virt_env_dir}

  source ${virt_env_dir}/bin/activate

  

  pip3 install inspektor

We needed to make the following further changes to the container
so it can run the integration tests:

  • Needs to run as root (standard-test-roles require this)
  • Needs to have a $HOME directory set (for python/ansible)
  • Needs /var to be legit, since we test rpm functionality
  • Need python3-fmf which is in not in EPEL or CentOS

rebased onto f97e08b

5 years ago

pretty please pagure-ci rebuild

pretty please pagure-ci rebuild

Jenkins CI passed 238. ACK to merge.

Commit 47df992 fixes this pull-request

Pull-Request has been merged by astepano

5 years ago

Pull-Request has been merged by astepano

5 years ago