From 01ea484624d0ee289139c56d80e21bb52cd7ca0f Mon Sep 17 00:00:00 2001 From: Chris Ashton Date: Tue, 4 Feb 2020 10:24:27 +0000 Subject: [PATCH] Move GitHub 'pending' status update before the lock Update the GitHub status of a publishing-e2e-tests check _before_ then waiting for a machine to run the tests on. We quite often have a queue of tests waiting to run (e.g. in a mass dependabot upgrade across multiple repositories). If the tests are being flaky, the lack of visibility over the status can exacerbate the problem as we may accidentally queue up several test re-runs for the same PR. --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5ee452ba..15dfa933 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,11 +35,11 @@ def apps = [ timestamps { node("publishing-e2e-tests") { initializeParameters(govuk, apps) + + originBuildStatus("Running publishing end-to-end tests on Jenkins", "PENDING", params) lock("publishing-e2e-tests-$NODE_NAME") { try { - originBuildStatus("Running publishing end-to-end tests on Jenkins", "PENDING", params) - stage("Clean workspace") { checkout(scm) sh("make -j clean_tmp clean_apps")