Alexandros Kosiaris has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/327720 )
Change subject: package_builder: if guard the C10shell hook ...................................................................... package_builder: if guard the C10shell hook There are use cases where we want to not drop by default to shell when a build fails. Specify a SHELL_ON_FAILURE variable in pbuilderrc that is overrideable and allows builds to define it to avoid that behavior Change-Id: I94e495cca2634d912228aafa0378ad68a6548155 --- M modules/package_builder/templates/C10shell.wikimedia.org.erb M modules/package_builder/templates/pbuilderrc.erb 2 files changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/20/327720/1 diff --git a/modules/package_builder/templates/C10shell.wikimedia.org.erb b/modules/package_builder/templates/C10shell.wikimedia.org.erb index a93c7b2..7d0b272 100644 --- a/modules/package_builder/templates/C10shell.wikimedia.org.erb +++ b/modules/package_builder/templates/C10shell.wikimedia.org.erb @@ -1,13 +1,16 @@ #!/bin/bash # # invoke shell if build fails. -cd /tmp/buildd/*/debian/.. +# +if [ "${SHELL_ON_FAILURE}" = "yes" ]; then + cd /tmp/buildd/*/debian/.. -echo "**************************************************************" -echo "The build has failed. We are now running a shell in the chroot" -echo "used for building, giving you the chance to investigate the" -echo "failure. Note that leaving this shell means exiting the chroot" -echo "itself and the chroot will be removed immediately afterwards." -echo "**************************************************************" + echo "**************************************************************" + echo "The build has failed. We are now running a shell in the chroot" + echo "used for building, giving you the chance to investigate the" + echo "failure. Note that leaving this shell means exiting the chroot" + echo "itself and the chroot will be removed immediately afterwards." + echo "**************************************************************" -/bin/bash < /dev/tty > /dev/tty 2> /dev/tty + /bin/bash < /dev/tty > /dev/tty 2> /dev/tty +fi diff --git a/modules/package_builder/templates/pbuilderrc.erb b/modules/package_builder/templates/pbuilderrc.erb index 834d630..416c1a4 100644 --- a/modules/package_builder/templates/pbuilderrc.erb +++ b/modules/package_builder/templates/pbuilderrc.erb @@ -8,6 +8,9 @@ WIKIMEDIA=${WIKIMEDIA:-"no"} # Default to not use distribution backports BACKPORTS=${BACKPORTS:-"no"} +# Default to drop to shell on build failure +SHELL_ON_FAILURE=${SHELL_ON_FAILURE:-"yes"} +export SHELL_ON_FAILURE # If DIST has been declared like dist-wikimedia, handle it like as if the user # wanted to specify WIKIMEDIA="yes" which will satisfy build dependencies from -- To view, visit https://gerrit.wikimedia.org/r/327720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94e495cca2634d912228aafa0378ad68a6548155 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits