This is an automated email from the ASF dual-hosted git repository. dill0wn pushed a commit to branch dw/8427 in repository https://gitbox.apache.org/repos/asf/allura.git
commit 831eae8167b9ea733687c5d967353488ddcd33ef Author: Dillon Walls <[email protected]> AuthorDate: Wed Apr 20 12:01:13 2022 -0400 [#8427] fix jenkins failing on forgegit --- Dockerfile | 9 ++++++--- scripts/jenkins-python3.7.sh | 31 ++++++++++++++++++------------- 2 files changed, 24 insertions(+), 16 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..eb8fdd53c 100755 --- a/scripts/jenkins-python3.7.sh +++ b/scripts/jenkins-python3.7.sh @@ -41,36 +41,41 @@ 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 + +docker-compose up -d web + echo echo "=============================================================================" echo "Docker Container Info:" echo "=============================================================================" -docker-compose run web bash -c ' +docker-compose exec 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 echo "=============================================================================" echo "Setup: tests" echo "=============================================================================" # set up test dependencies -docker-compose run web pip install -r requirements-dev.txt +docker-compose exec web pip install -q -r requirements-dev.txt echo echo "=============================================================================" @@ -78,14 +83,14 @@ 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 web pyflakes Allura* Forge* scripts | awk -F\: '{printf "%s:%s: [E]%s\n", $1, $2, $3}' > pyflakes.txt +docker-compose exec web 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 -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; +find . -name .coverage -maxdepth 2 | while read coveragefile; do pushd `dirname $coveragefile`; coverage xml --include='forge*,allura*'; popd; done; echo echo "============================================================================="
