From dab82c25ba94664d000aaff247493c775fe9c04a Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Thu, 9 Aug 2018 18:02:12 -0400 Subject: [PATCH 1/2] ci-public: replace multijob with freestyle for `custom-suites` I've configure a new job https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/ (job XML attached). This should replace https://ci.nodejs.org/job/node-test-commit-custom-suites/ in node-test-commit, as the current one is based on `multijob` which ignores the `PLATFORM_LABEL` parameter, which is unneccecery in this scenario. Because of its limitations the current job is recursive (the flyweight job runs on a `jenkins-workspace` node and the actual build also runs on a `jenkins-workspace` node) so when the systems under load it can lead to unexpected behavior. This is the diff from the current job https://www.diffchecker.com/MKqrFehH --- ...de-test-commit-custom-suites-freestyle.xml | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 jenkins/xml/node-test-commit-custom-suites-freestyle.xml diff --git a/jenkins/xml/node-test-commit-custom-suites-freestyle.xml b/jenkins/xml/node-test-commit-custom-suites-freestyle.xml new file mode 100644 index 000000000..8ac3f67e3 --- /dev/null +++ b/jenkins/xml/node-test-commit-custom-suites-freestyle.xml @@ -0,0 +1,208 @@ + + + + + false + + + https://github.com/nodejs/node/ + + + + false + false + + + + + GITHUB_ORG + The user/org of the GitHub repo + nodejs + true + + + REPO_NAME + The name of the repo + node + true + + + GIT_REMOTE_REF + The remote portion of the Git refspec to fetch and test + refs/heads/master + true + + + REBASE_ONTO + Optionally, rebase onto the given ref before testing. Leave blank to skip rebasing. + + true + + + POST_REBASE_SHA1_CHECK + + After rebasing, check that the resulting commit sha1 matches the given one. If left blank, no check is performed. + true + + + IGNORE_FLAKY_TESTS + Mark the build as unstable instead of failure if only flaky tests fail + false + + + CONFIG_FLAGS + Add arguments to ./configure + + false + + + CI_JS_SUITES + Suites to run tools/test.py for, separated by spaces (e.g. internet) + + false + + + TEST_ARGS + Additional arguments to pass to `python tools/test.py` (e.g. --worker) + + false + + + PLATFORM_LABEL + + ubuntu1604-64 + false + allCases + + + + + + 0 + 0 + + false + project + false + + + + + 2 + + + origin + +$GIT_REMOTE_REF:refs/remotes/origin/_jenkins_local_branch + git@github.com:$GITHUB_ORG/$REPO_NAME.git + 96d5f81c-e9ad-45f7-ba5d-bc8107c0ae2c + + + + + refs/heads/_jenkins_local_branch + + + false + + + + + + + + false + true + /data/iojs/git/io.js.reference + 20 + 0 + false + + + true + + + + true + false + false + false + + true + node-test-commit-custom-suites + + + curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-pre.sh | bash -ex -s before + + + #/bin/bash + +echo $NODE_NAME + +rm -rf build +git clone https://github.com/nodejs/build.git +. ./build/jenkins/scripts/select-compiler.sh + +SKIP_MESSAGE="ok" +REVELANT_VERSION=1 +if [ "$NODEJS_MAJOR_VERSION" -lt "6" ]; then + REVELANT_VERSION= + # 390 is only supported on v6 and later for now + SKIP_MESSAGE="ok # skipped s390 not supported for versions less than 6, skipping" +fi + +RELEVANT_SUITE=1 +if [ "$CI_JS_SUITES" = "v8-updates" ] && [ "$NODEJS_MAJOR_VERSION" -lt "11" ]; then + RELEVANT_SUITE= +fi + +if [ "$TEST_ARGS" = "--worker" ] && [ "$NODEJS_MAJOR_VERSION" -lt "10" ]; then + RELEVANT_SUITE= +fi + +JOBS=$(getconf _NPROCESSORS_ONLN) + +if [ $REVELANT_VERSION ] && [ $RELEVANT_SUITE ]; then + NODE_TEST_DIR=${HOME}/node-tmp + NODE_COMMON_PORT=15000 + PYTHON=python + FLAKY_TESTS=$FLAKY_TESTS_MODE + make build-ci -j $JOBS + python tools/test.py -j $JOBS -p tap --logfile test.tap --mode=release --flaky-tests=dontcare $TEST_ARGS $CI_JS_SUITES +else + # fake out so we don't get failures + mkdir out + echo "1..1" >test.tap + echo "ok 1 # skip $SKIP_MESSAGE" >> test.tap + echo " ---" >> test.tap + echo " duration_ms: 4.925" >> test.tap + echo " ..." >> test.tap +fi + + + curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-diagnostics.sh | bash -ex -s after + + + mkdir out/junit || true +tap2junit -i test.tap -o out/junit/test.xml || true + + + + + out/junit/*.xml + true + 1.0 + true + + + + + + 900 + + + + + + + + From 021ee38c80a959a5d9983a11434b739b1a709566 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Fri, 10 Aug 2018 12:59:43 -0400 Subject: [PATCH 2/2] fixup!: address comment & fix git fetch --- jenkins/xml/node-test-commit-custom-suites-freestyle.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins/xml/node-test-commit-custom-suites-freestyle.xml b/jenkins/xml/node-test-commit-custom-suites-freestyle.xml index 8ac3f67e3..083e62f76 100644 --- a/jenkins/xml/node-test-commit-custom-suites-freestyle.xml +++ b/jenkins/xml/node-test-commit-custom-suites-freestyle.xml @@ -40,8 +40,8 @@ POST_REBASE_SHA1_CHECK - - After rebasing, check that the resulting commit sha1 matches the given one. If left blank, no check is performed. + After rebasing, checks that the resulting commit sha1 matches the given one. If left blank, no check is performed. + true @@ -92,7 +92,7 @@ origin - +$GIT_REMOTE_REF:refs/remotes/origin/_jenkins_local_branch + +refs/heads/*:refs/remotes/origin/* +$GIT_REMOTE_REF:refs/remotes/origin/_jenkins_local_branch git@github.com:$GITHUB_ORG/$REPO_NAME.git 96d5f81c-e9ad-45f7-ba5d-bc8107c0ae2c