jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/389924 )
Change subject: docker: enhance tox image for signals
......................................................................
docker: enhance tox image for signals
Change Docker ENTRYPOINT to exec form, else our script is wrapped in a
sh -c '', which shallows signals.
Make run.sh executable.
Drop a misleading comment about setting envlogdir in tox.
Rename the trap function and register it after the git commands. In case
git fails, that will no more attempts to capture inexistents tox log
files.
Stop logging to stdout. It is already in the Jenkins console.
Update:
apps-android-wikipedia-tox-docker
cumin-tox-docker
fundraising-tools-tox-docker
integration-config-tox-docker
labs-tox-docker
mwgate-tox-docker
search-mjolnir-tox-docker
tox-docker
Bug: T176747
Change-Id: Ia1f481f1f7fb1d41dee671e7fad429a694e60dfd
---
M dockerfiles/tox/Dockerfile
M dockerfiles/tox/run.sh
M jjb/python-jobs.yaml
M jjb/search.yaml
4 files changed, 7 insertions(+), 10 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/dockerfiles/tox/Dockerfile b/dockerfiles/tox/Dockerfile
index af45d37..71c8993 100644
--- a/dockerfiles/tox/Dockerfile
+++ b/dockerfiles/tox/Dockerfile
@@ -26,5 +26,5 @@
USER nobody
WORKDIR /src
-ENTRYPOINT /bin/bash /run.sh
+ENTRYPOINT ["/run.sh"]
COPY run.sh /run.sh
diff --git a/dockerfiles/tox/run.sh b/dockerfiles/tox/run.sh
old mode 100644
new mode 100755
index 73df486..2abd52b
--- a/dockerfiles/tox/run.sh
+++ b/dockerfiles/tox/run.sh
@@ -7,17 +7,12 @@
LOG_DIR=/log
export LOG_DIR
-capture_logs() {
+capture_tox_logs() {
# XXX unlike `mv`, `cp` does not preserve permissions and hence the
# destination files will inherit the group thanks to log having setgid.
- #
- # XXX later tox version supports specifying the envs log directory
- #
cp --recursive /src/.tox/*/log/*.log "${LOG_DIR}" || /bin/true
cp --recursive /src/.tox/log "${LOG_DIR}" || /bin/true
}
-
-trap capture_logs EXIT
cd /src
@@ -26,6 +21,8 @@
git checkout --quiet FETCH_HEAD
git submodule --quiet update --init --recursive
+trap capture_tox_logs EXIT
+
# Run tests. Pass all environment variables to tox since the environment here
# is already pretty restrictive.
-TOX_TESTENV_PASSENV="*" PY_COLORS=1 tox -v | tee "${LOG_DIR}/stdout.log"
+TOX_TESTENV_PASSENV="*" PY_COLORS=1 tox -v
diff --git a/jjb/python-jobs.yaml b/jjb/python-jobs.yaml
index 94c2bc0..c7d95c5 100644
--- a/jjb/python-jobs.yaml
+++ b/jjb/python-jobs.yaml
@@ -68,7 +68,7 @@
name: 'tox-docker'
node: DebianJessieDocker
concurrent: true
- docker_image_var: 'wmfreleng/tox:v2017.11.01.16.28'
+ docker_image_var: 'wmfreleng/tox:v2017.11.10.11.49'
triggers:
- zuul
builders:
diff --git a/jjb/search.yaml b/jjb/search.yaml
index f9a0a22..4575b35 100644
--- a/jjb/search.yaml
+++ b/jjb/search.yaml
@@ -20,7 +20,7 @@
name: search-mjolnir
jobs:
- '{name}-tox-docker':
- docker_image_var: wmfreleng/tox-pyspark:v2017.11.07.12.13
+ docker_image_var: wmfreleng/tox-pyspark:v2017.11.10.11.49
build_timeout: 6 # minutes
# Sadly this does not test the python code with the jvm code, instead
# using the last release of the jvm code, But it's a good start.
--
To view, visit https://gerrit.wikimedia.org/r/389924
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1f481f1f7fb1d41dee671e7fad429a694e60dfd
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits