{"thread":{"id":"50616","subject":"[PATCH 0/1] Retire the \"let Travis trigger a Windows build\" hack","startedAt":"2019-02-28T19:33:55Z","lastAt":"2019-02-28T19:33:57Z","messageCount":2,"participants":["Johannes Schindelin via GitGitGadget"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"370370","messageId":"pull.154.git.gitgitgadget@gmail.com","threadId":"50616","inReplyTo":null,"subject":"[PATCH 0/1] Retire the \"let Travis trigger a Windows build\" hack","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-02-28T19:33:51Z","receivedAt":"2019-02-28T19:33:55Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"We have something much better now: a real Azure Pipeline. Not only is it a\nlot faster (due to parallelizing the test suite), it also won't time out\nwaiting for the Windows job to start.\n\nJohannes Schindelin (1):\n  travis: remove the hack to build the Windows job on Azure Pipelines\n\n .travis.yml             |  10 ----\n ci/run-windows-build.sh | 103 ----------------------------------------\n 2 files changed, 113 deletions(-)\n delete mode 100755 ci/run-windows-build.sh\n\n\nbase-commit: 8104ec994ea3849a968b4667d072fedd1e688642\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-154%2Fdscho%2Fremove-travis-windows-hack-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-154/dscho/remove-travis-windows-hack-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/154\n-- \ngitgitgadget\n"},{"id":"370371","messageId":"4c14991d0672617460638b1bb445686da09c4889.1551382431.git.gitgitgadget@gmail.com","threadId":"50616","inReplyTo":"pull.154.git.gitgitgadget@gmail.com","subject":"[PATCH 1/1] travis: remove the hack to build the Windows job on Azure Pipelines","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-02-28T19:33:52Z","receivedAt":"2019-02-28T19:33:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nSince Travis did not support Windows (and now only supports very limited\nWindows jobs, too limited for our use, the test suite would time out\n*all* the time), we added a hack where a Travis job would trigger an\nAzure Pipeline (which back then was still called VSTS Build), wait for\nit to finish (or time out), and download the log (if available).\n\nNeedless to say that it was a horrible hack, necessitated by a bad\nsituation.\n\nNowadays, however, we have Azure Pipelines support, and do not need that\nhack anymore. So let's retire it.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .travis.yml             |  10 ----\n ci/run-windows-build.sh | 103 ----------------------------------------\n 2 files changed, 113 deletions(-)\n delete mode 100755 ci/run-windows-build.sh\n\ndiff --git a/.travis.yml b/.travis.yml\nindex 36cbdea7f4..ffb1bc46f2 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -21,16 +21,6 @@ matrix:\n       compiler:\n       addons:\n       before_install:\n-    - env: jobname=Windows\n-      os: linux\n-      compiler:\n-      addons:\n-      before_install:\n-      script:\n-        - >\n-          test \"$TRAVIS_REPO_SLUG\" != \"git/git\" ||\n-          ci/run-windows-build.sh $TRAVIS_BRANCH $(git rev-parse HEAD)\n-      after_failure:\n     - env: jobname=Linux32\n       os: linux\n       compiler:\ndiff --git a/ci/run-windows-build.sh b/ci/run-windows-build.sh\ndeleted file mode 100755\nindex a73a4eca0a..0000000000\n--- a/ci/run-windows-build.sh\n+++ /dev/null\n@@ -1,103 +0,0 @@\n-#!/usr/bin/env bash\n-#\n-# Script to trigger the Git for Windows build and test run.\n-# Set the $GFW_CI_TOKEN as environment variable.\n-# Pass the branch (only branches on https://github.com/git/git are\n-# supported) and a commit hash.\n-#\n-\n-. ${0%/*}/lib.sh\n-\n-test $# -ne 2 && echo \"Unexpected number of parameters\" && exit 1\n-test -z \"$GFW_CI_TOKEN\" && echo \"GFW_CI_TOKEN not defined\" && exit\n-\n-BRANCH=$1\n-COMMIT=$2\n-\n-gfwci () {\n-\tlocal CURL_ERROR_CODE HTTP_CODE\n-\tCONTENT_FILE=$(mktemp -t \"git-windows-ci-XXXXXX\")\n-\twhile test -z $HTTP_CODE\n-\tdo\n-\tHTTP_CODE=$(curl \\\n-\t\t-H \"Authentication: Bearer $GFW_CI_TOKEN\" \\\n-\t\t--silent --retry 5 --write-out '%{HTTP_CODE}' \\\n-\t\t--output >(sed \"$(printf '1s/^\\xef\\xbb\\xbf//')\" >$CONTENT_FILE) \\\n-\t\t\"https://git-for-windows-ci.azurewebsites.net/api/TestNow?$1\" \\\n-\t)\n-\tCURL_ERROR_CODE=$?\n-\t\t# The GfW CI web app sometimes returns HTTP errors of\n-\t\t# \"502 bad gateway\" or \"503 service unavailable\".\n-\t\t# We also need to check the HTTP content because the GfW web\n-\t\t# app seems to pass through (error) results from other Azure\n-\t\t# calls with HTTP code 200.\n-\t\t# Wait a little and retry if we detect this error. More info:\n-\t\t# https://docs.microsoft.com/en-in/azure/app-service-web/app-service-web-troubleshoot-http-502-http-503\n-\t\tif test $HTTP_CODE -eq 502 ||\n-\t\t   test $HTTP_CODE -eq 503 ||\n-\t\t   grep \"502 - Web server received an invalid response\" $CONTENT_FILE >/dev/null\n-\t\tthen\n-\t\t\tsleep 10\n-\t\t\tHTTP_CODE=\n-\t\tfi\n-\tdone\n-\tcat $CONTENT_FILE\n-\trm $CONTENT_FILE\n-\tif test $CURL_ERROR_CODE -ne 0\n-\tthen\n-\t\treturn $CURL_ERROR_CODE\n-\tfi\n-\tif test \"$HTTP_CODE\" -ge 400 && test \"$HTTP_CODE\" -lt 600\n-\tthen\n-\t\treturn 127\n-\tfi\n-}\n-\n-# Trigger build job\n-BUILD_ID=$(gfwci \"action=trigger&branch=$BRANCH&commit=$COMMIT&skipTests=false\")\n-if test $? -ne 0\n-then\n-\techo \"Unable to trigger Visual Studio Team Services Build\"\n-\techo \"$BUILD_ID\"\n-\texit 1\n-fi\n-\n-# Check if the $BUILD_ID contains a number\n-case $BUILD_ID in\n-''|*[!0-9]*) echo \"Unexpected build number: $BUILD_ID\" && exit 1\n-esac\n-\n-echo \"Visual Studio Team Services Build #${BUILD_ID}\"\n-\n-# Tracing execued commands would produce too much noise in the waiting\n-# loop below.\n-set +x\n-\n-# Wait until build job finished\n-STATUS=\n-RESULT=\n-while true\n-do\n-\tLAST_STATUS=$STATUS\n-\tSTATUS=$(gfwci \"action=status&buildId=$BUILD_ID\")\n-\ttest \"$STATUS\" = \"$LAST_STATUS\" || printf \"\\nStatus: %s \" \"$STATUS\"\n-\tprintf \".\"\n-\n-\tcase \"$STATUS\" in\n-\tinProgress|postponed|notStarted) sleep 10               ;; # continue\n-\t\t \"completed: succeeded\") RESULT=\"success\"; break;; # success\n-\t\t    \"completed: failed\")                   break;; # failure\n-\t*) echo \"Unhandled status: $STATUS\";               break;; # unknown\n-\tesac\n-done\n-\n-# Print log\n-echo \"\"\n-echo \"\"\n-set -x\n-gfwci \"action=log&buildId=$BUILD_ID\" | cut -c 30-\n-\n-# Set exit code for TravisCI\n-test \"$RESULT\" = \"success\"\n-\n-save_good_tree\n-- \ngitgitgadget\n"}]}