run_ci_tests_containers.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. set -x
  2. yum install -y podman
  3. set -e
  4. echo $BRANCH $REPO
  5. if [ -n "$REPO" -a -n "$BRANCH" ]; then
  6. git remote rm proposed || true
  7. git gc --auto
  8. git remote add proposed "$REPO"
  9. git fetch proposed
  10. git checkout origin/master
  11. git config --global user.email "you@example.com"
  12. git config --global user.name "Your Name"
  13. git merge --no-ff "proposed/$BRANCH" -m "Merge PR"
  14. echo "Running tests for branch $BRANCH of repo $REPO"
  15. echo "Last commits:"
  16. git --no-pager log -2
  17. fi
  18. podman build --rm -t pagure-f29-rpms-py3 \
  19. -f dev/containers/f29-rpms-py3 \
  20. dev/containers
  21. if [ ! -d `pwd`/results_f29-rpms-py3 ]; then
  22. mkdir `pwd`/results_f29-rpms-py3;
  23. fi
  24. podman run --rm -it --name pagure-f29-rpms-py3 \
  25. -v `pwd`/results_f29-rpms-py3:/pagure/results:z \
  26. -e BRANCH=$BRANCH \
  27. -e REPO=$REPO \
  28. pagure-f29-rpms-py3
  29. podman build --rm -t pagure-c7-rpms-py2 \
  30. -f dev/containers/centos7-rpms-py2 \
  31. dev/containers
  32. if [ ! -d `pwd`/results_centos7-rpms-py2 ]; then
  33. mkdir `pwd`/results_centos7-rpms-py2;
  34. fi
  35. podman run --rm -it --name pagure-c7-rpms-py2 \
  36. -v `pwd`/results_centos7-rpms-py2:/pagure/results:z \
  37. -e BRANCH=$BRANCH \
  38. -e REPO=$REPO \
  39. pagure-c7-rpms-py2
  40. podman build --rm -t pagure-fedora-pip-py3 \
  41. -f dev/containers/fedora-pip-py3 \
  42. dev/containers
  43. if [ ! -d `pwd`/results_fedora-pip-py3 ]; then
  44. mkdir `pwd`/results_fedora-pip-py3;
  45. fi
  46. podman run --rm -it --name pagure-fedora-pip-py3 \
  47. -v `pwd`/results_fedora-pip-py3:/pagure/results:z \
  48. -e BRANCH=$BRANCH \
  49. -e REPO=$REPO \
  50. pagure-fedora-pip-py3