You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2022/04/27 19:58:38 UTC

[allura] branch master updated: [#8427] fix for jenkins failing on forgegit

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/master by this push:
     new b5f1a924a [#8427] fix for jenkins failing on forgegit
b5f1a924a is described below

commit b5f1a924a3d7ce85171687ef18dc643e038909e6
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Wed Apr 20 12:01:13 2022 -0400

    [#8427] fix for jenkins failing on forgegit
---
 Dockerfile                   |  9 ++++++---
 scripts/jenkins-python3.7.sh | 40 ++++++++++++++++++++++++++++------------
 2 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 340b3e09b..2b2a9c0c7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,10 +21,13 @@ FROM ubuntu:18.04
 # In order to get python3.7, we must add the deadsnakes apt repo, and install 3.7 specifically
 RUN apt-get update \
     && apt-get install software-properties-common -y --no-install-recommends \
-    && add-apt-repository ppa:deadsnakes/ppa
+    && add-apt-repository ppa:deadsnakes/ppa -y \
+    && add-apt-repository ppa:git-core/ppa -y \
+    && apt-get update
+    
+RUN apt-get upgrade -y git
 
-RUN apt-get update \
-    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         git-core \
         python3.7 \
         python3.7-venv \
diff --git a/scripts/jenkins-python3.7.sh b/scripts/jenkins-python3.7.sh
index 1cf42179a..3746742a8 100755
--- a/scripts/jenkins-python3.7.sh
+++ b/scripts/jenkins-python3.7.sh
@@ -26,7 +26,10 @@ echo "Jenkins Host Info:"
 echo "============================================================================="
 echo -n 'cpu count: '; grep -c processor /proc/cpuinfo 
 echo hostname: `hostname --short`
+echo whoami: `whoami`
 echo NODE_NAME: $NODE_NAME
+echo docker: `docker version`
+echo docker compose: `docker-compose version`
 echo path: $PATH
 echo workspace: $WORKSPACE
 echo jenkins_home: $JENKINS_HOME
@@ -41,36 +44,49 @@ echo "==========================================================================
 rm -rf ./allura-data
 git clean -f -x  # remove test.log, nosetest.xml etc (don't use -d since it'd remove our venv dir)
 
+docker-compose down
+
 echo
 echo "============================================================================="
 echo "Run: build docker image"
 echo "============================================================================="
 docker-compose build
 
+echo
+echo "============================================================================="
+echo "Setup: venv, pip, pysvn, ./rebuild-all.sh, npm, etc."
+echo "============================================================================="
+docker-compose run web scripts/init-docker-dev.sh
+
+echo
+echo "============================================================================="
+echo "Starting up docker containers"
+echo "============================================================================="
+docker-compose up -d web
+
 echo
 echo "============================================================================="
 echo "Docker Container Info:"
 echo "============================================================================="
-docker-compose run web bash -c '
+docker-compose exec -T web bash -c '
 echo python path: `which python; python -V`;
 echo python3.7 path: `which python3.7; python3.7 -V`;
 git --version;
 svn --version;
 echo pip: `pip3 --version`;
-echo npm: `npm --version`;'
-
-echo
-echo "============================================================================="
-echo "Setup: venv, pip, pysvn, ./rebuild-all.sh, npm, etc."
-echo "============================================================================="
-docker-compose run web scripts/init-docker-dev.sh
+echo npm: `npm --version`;
+echo whoami: `whoami`;
+'
 
 echo
 echo "============================================================================="
 echo "Setup: tests"
 echo "============================================================================="
 # set up test dependencies
-docker-compose run web pip install -r requirements-dev.txt
+docker-compose exec -T web pip install -q -r requirements-dev.txt
+
+# make test git repos safe to run even though owned by different user
+docker-compose exec -T web chown root:root -R /allura
 
 echo
 echo "============================================================================="
@@ -78,11 +94,11 @@ echo "Run: tests"
 echo "============================================================================="
 
 # use "Allura* Forge* scripts" instead of "." so that .allura-venv doesn't get checked too (and '.' gives './' prefixed results which don't work out)
-docker-compose run web pyflakes Allura* Forge* scripts | awk -F\: '{printf "%s:%s: [E]%s\n", $1, $2, $3}' > pyflakes.txt
-docker-compose run web pycodestyle Allura* Forge* scripts > pep8.txt
+docker-compose exec -T web bash -c "pyflakes Allura* Forge* scripts | awk -F\: '{printf \"%s:%s: [E]%s\n\", \$1, \$2, \$3}' > pyflakes.txt"
+docker-compose exec -T web bash -c "pycodestyle Allura* Forge* scripts > pep8.txt"
 
 # TODO: ALLURA_VALIDATION=all
-docker-compose run -e LANG=en_US.UTF-8 web ./run_tests --with-xunitmp # --with-coverage --cover-erase
+docker-compose exec -T -e LANG=en_US.UTF-8 web ./run_tests --with-xunitmp # --with-coverage --cover-erase
 retcode=$?
 
 #find . -name .coverage -maxdepth 2 | while read coveragefile; do pushd `dirname $coveragefile`; coverage xml --include='forge*,allura*'; popd; done;