Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci')
-rwxr-xr-xscripts/ci/run-jenkins.sh17
-rwxr-xr-xscripts/ci/run-test-acceptance-tests.sh2
-rwxr-xr-xscripts/ci/run-test-default.sh2
-rwxr-xr-xscripts/ci/run-test-helix.sh41
-rwxr-xr-xscripts/ci/run-test-interpreter.sh2
-rwxr-xr-xscripts/ci/run-test-mac-sdk.sh2
-rwxr-xr-xscripts/ci/run-test-mcs.sh2
-rwxr-xr-xscripts/ci/run-test-profiler-stress-tests.sh2
-rwxr-xr-xscripts/ci/run-test-stress-tests.sh2
-rwxr-xr-xscripts/ci/run-test-testing_aot_bitcode.sh2
-rwxr-xr-xscripts/ci/run-test-testing_aot_bitcode_interp.sh2
-rwxr-xr-xscripts/ci/run-test-testing_aot_full.sh2
-rwxr-xr-xscripts/ci/run-test-testing_aot_full_interp.sh2
-rwxr-xr-xscripts/ci/run-test-testing_aot_hybrid.sh2
-rwxr-xr-xscripts/ci/run-test-winaot.sh2
-rwxr-xr-xscripts/ci/run-upload-sentry.sh15
-rwxr-xr-xscripts/ci/util.sh68
17 files changed, 2 insertions, 165 deletions
diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh
index ec5900edf59..948193e8a81 100755
--- a/scripts/ci/run-jenkins.sh
+++ b/scripts/ci/run-jenkins.sh
@@ -24,10 +24,6 @@ source ${MONO_REPO_ROOT}/scripts/ci/util.sh
# # FIXME: Add more
# skip=false
# skip_step=""
-# if ! grep -q -v -e a/netcore -e a/scripts/ci/pipeline-netcore-runtime.yml pr-files.txt; then
-# skip_step="NETCORE"
-# skip=true
-# fi
# if ! grep -q -v a/mono/mini/mini-ppc pr-files.txt; then
# skip_step="PPC"
# skip=true
@@ -53,9 +49,6 @@ source ${MONO_REPO_ROOT}/scripts/ci/util.sh
# rm pr-files.txt
# fi
-helix_set_env_vars
-helix_send_build_start_event "build/source/$MONO_HELIX_TYPE/"
-
make_timeout=300m
gnumake=$(which gmake || which gnumake || which make)
@@ -378,7 +371,6 @@ if [[ ${CI_TAGS} == *'webassembly'* ]] || [[ ${CI_TAGS} == *'wasm'* ]];
fi
echo "ENABLE_WASM_THREADS=1" >> sdks/Make.config
- #echo "ENABLE_WASM_NETCORE=1" >> sdks/Make.config
export aot_test_suites="System.Core"
export mixed_test_suites="System.Core"
@@ -402,8 +394,8 @@ if [[ ${CI_TAGS} == *'webassembly'* ]] || [[ ${CI_TAGS} == *'wasm'* ]];
${TESTCMD} --label=system-core --timeout=60m $gnumake -C sdks/wasm run-all-System.Core
for suite in ${xunit_test_suites}; do ${TESTCMD} --label=xunit-${suite} --timeout=30m $gnumake -C sdks/wasm run-${suite}-xunit; done
# disable for now until https://github.com/mono/mono/pull/13622 goes in
- ${TESTCMD} --label=browser --timeout=20m $gnumake -C sdks/wasm run-browser-tests
- ${TESTCMD} --label=browser-threads --timeout=20m $gnumake -C sdks/wasm run-browser-threads-tests
+ #${TESTCMD} --label=browser --timeout=20m $gnumake -C sdks/wasm run-browser-tests
+ #${TESTCMD} --label=browser-threads --timeout=20m $gnumake -C sdks/wasm run-browser-threads-tests
#${TESTCMD} --label=browser-dynamic --timeout=20m $gnumake -C sdks/wasm run-browser-dynamic-tests
if [[ ${CI_TAGS} == *'osx-amd64'* ]]; then
${TESTCMD} --label=browser-safari --timeout=20m $gnumake -C sdks/wasm run-browser-safari-tests
@@ -412,8 +404,6 @@ if [[ ${CI_TAGS} == *'webassembly'* ]] || [[ ${CI_TAGS} == *'wasm'* ]];
${TESTCMD} --label=build-aot-all --timeout=20m $gnumake -j ${CI_CPU_COUNT} -C sdks/wasm build-aot-all
for suite in ${aot_test_suites}; do ${TESTCMD} --label=run-aot-${suite} --timeout=10m $gnumake -C sdks/wasm run-aot-${suite}; done
for suite in ${mixed_test_suites}; do ${TESTCMD} --label=run-aot-mixed-${suite} --timeout=10m $gnumake -C sdks/wasm run-aot-mixed-${suite}; done
- # Requires a net 3.0 sdk
- #${TESTCMD} --label=netcore --timeout=20m $gnumake -j ${CI_CPU_COUNT} -C sdks/wasm run-hello-netcore
#${TESTCMD} --label=check-aot --timeout=20m $gnumake -C sdks/wasm check-aot
fi
exit 0
@@ -462,11 +452,9 @@ if [[ ${CI_TAGS} != *'mac-sdk'* ]]; # Mac SDK builds Mono itself
then
build_error=0
${TESTCMD} --label=make --timeout=${make_timeout} --fatal make ${make_parallelism} ${make_continue} -w V=1 || build_error=1
- helix_send_build_done_event "build/source/$MONO_HELIX_TYPE/" $build_error
if [[ ${build_error} != 0 ]]; then
echo "ERROR: The Mono build failed."
- ${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
exit ${build_error}
fi
fi
@@ -485,7 +473,6 @@ elif [[ ${CI_TAGS} == *'stress-tests'* ]]; then ${MONO_REPO_ROOT}/sc
elif [[ ${CI_TAGS} == *'interpreter'* ]]; then ${MONO_REPO_ROOT}/scripts/ci/run-test-interpreter.sh;
elif [[ ${CI_TAGS} == *'mcs-compiler'* ]]; then ${MONO_REPO_ROOT}/scripts/ci/run-test-mcs.sh;
elif [[ ${CI_TAGS} == *'mac-sdk'* ]]; then ${MONO_REPO_ROOT}/scripts/ci/run-test-mac-sdk.sh;
-elif [[ ${CI_TAGS} == *'helix-tests'* ]]; then ${MONO_REPO_ROOT}/scripts/ci/run-test-helix.sh;
elif [[ ${CI_TAGS} == *'compile-msbuild-source'* ]]; then ${MONO_REPO_ROOT}/scripts/ci/run-test-msbuild.sh;
elif [[ ${CI_TAGS} == *'make-install'* ]]; then ${MONO_REPO_ROOT}/scripts/ci/run-test-make-install.sh;
elif [[ ${CI_TAGS} == *'compiler-server-tests'* ]]; then ${MONO_REPO_ROOT}/scripts/ci/run-test-compiler-server.sh;
diff --git a/scripts/ci/run-test-acceptance-tests.sh b/scripts/ci/run-test-acceptance-tests.sh
index 2b303586ce8..61d0b97165b 100755
--- a/scripts/ci/run-test-acceptance-tests.sh
+++ b/scripts/ci/run-test-acceptance-tests.sh
@@ -30,5 +30,3 @@ ${TESTCMD} --label=coreclr-runtest-coremanglib --timeout=10m make -C acceptance-
# run the GC stress tests (on PRs we only run a short version)
${TESTCMD} --label=coreclr-gcstress --timeout=1200m make -C acceptance-tests coreclr-gcstress
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-default.sh b/scripts/ci/run-test-default.sh
index c11f89a8b6c..ce6874d66a6 100755
--- a/scripts/ci/run-test-default.sh
+++ b/scripts/ci/run-test-default.sh
@@ -155,5 +155,3 @@ fi
${TESTCMD} --label=bundle-test-results --timeout=2m find . -name "TestResult*.xml" -exec tar -rvf TestResults.tar {} \;
rm -fr /tmp/jenkins-temp-aspnet*
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-helix.sh b/scripts/ci/run-test-helix.sh
deleted file mode 100755
index e885b9cf214..00000000000
--- a/scripts/ci/run-test-helix.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash -e
-
-source ${MONO_REPO_ROOT}/scripts/ci/util.sh
-
-helix_send_build_start_event "build/tests/$MONO_HELIX_TYPE/"
-${TESTCMD} --label=compile-runtime-tests --timeout=20m --fatal make -w -C mono -j ${CI_CPU_COUNT} test
-# workaround some races in the tests build
-for dir in mcs/tools/nunit-lite mcs/class/Microsoft.Build*; do
- ${TESTCMD} --label=compile-$(basename $dir) --timeout=5m make -w -C $dir test xunit-test
- ${TESTCMD} --label=compile-$(basename $dir)-xbuild_12 --timeout=5m make -w -C $dir test xunit-test PROFILE=xbuild_12
- ${TESTCMD} --label=compile-$(basename $dir)-xbuild_14 --timeout=5m make -w -C $dir test xunit-test PROFILE=xbuild_14
-done
-${TESTCMD} --label=compile-bcl-tests --timeout=40m --fatal make -w -C runtime -j ${CI_CPU_COUNT} test xunit-test
-${TESTCMD} --label=create-test-payload --timeout=5m --fatal make -w test-bundle TEST_BUNDLE_PATH="$MONO_REPO_ROOT/mono-test-bundle"
-helix_send_build_done_event "build/tests/$MONO_HELIX_TYPE/" 0
-
-# get libgdiplus from CI output
-if [[ ${CI_TAGS} == *'linux-amd64'* ]]; then
- wget "https://xamjenkinsartifact.blob.core.windows.net/test-libgdiplus-mainline/280/debian-9-amd64/src/.libs/libgdiplus.so" -O "$MONO_REPO_ROOT/mono-test-bundle/mono-libgdiplus.so"
-else
- echo "Unknown OS, couldn't determine appropriate libgdiplus."
- exit 1
-fi
-
-export MONO_HELIX_TEST_PAYLOAD_DIRECTORY="$MONO_REPO_ROOT/mono-test-bundle"
-export MONO_HELIX_CORRELATION_ID_FILE="$MONO_REPO_ROOT/test-correlation-id.txt"
-${TESTCMD} --label=upload-helix-tests --timeout=5m --fatal make -w -C mcs/tools/mono-helix-client upload-to-helix
-
-# test suites which aren't ported to helix yet
-${TESTCMD} --label=mini-aotcheck --timeout=5m make -j ${CI_CPU_COUNT} -w -C mono/mini -k aotcheck
-${TESTCMD} --label=runtime --timeout=20m make -w -C mono/tests test-wrench IGNORE_TEST_JIT=1 V=1
-${TESTCMD} --label=runtime-unit-tests --timeout=5m make -w -C mono/unit-tests -k check
-${TESTCMD} --label=runtime-eglib-tests --timeout=5m make -w -C mono/eglib/test -k check
-${TESTCMD} --label=monolinker --timeout=10m make -w -C mcs/tools/linker check
-${TESTCMD} --label=System.Web.Extensions-standalone --timeout=5m make -w -C mcs/class/System.Web.Extensions run-standalone-test
-
-# wait for helix tests to complete
-export MONO_HELIX_CORRELATION_ID=$(cat "$MONO_HELIX_CORRELATION_ID_FILE")
-${TESTCMD} --label=wait-helix-tests --timeout=40m make -w -C mcs/tools/mono-helix-client wait-for-job-completion
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-interpreter.sh b/scripts/ci/run-test-interpreter.sh
index 2e5badc1760..e6756ca476e 100755
--- a/scripts/ci/run-test-interpreter.sh
+++ b/scripts/ci/run-test-interpreter.sh
@@ -114,5 +114,3 @@ if [[ "$run_full_test_suite" -eq "1" ]]; then
${TESTCMD} --label=Microsoft.Build.Utilities-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Utilities run-test PROFILE=xbuild_14 V=1
${TESTCMD} --label=System.IO.Compression --timeout=5m make -w -C mcs/class/System.IO.Compression run-test V=1
fi
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-mac-sdk.sh b/scripts/ci/run-test-mac-sdk.sh
index 3b73e6b333e..ad05685dfb9 100755
--- a/scripts/ci/run-test-mac-sdk.sh
+++ b/scripts/ci/run-test-mac-sdk.sh
@@ -23,5 +23,3 @@ else
# Bundled libgdiplus
${TESTCMD} --label="System.Drawing" --timeout=60m make -C mcs/class/System.Drawing run-test
fi
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-mcs.sh b/scripts/ci/run-test-mcs.sh
index 824ce78040e..c3f2e499a12 100755
--- a/scripts/ci/run-test-mcs.sh
+++ b/scripts/ci/run-test-mcs.sh
@@ -3,5 +3,3 @@
${TESTCMD} --label=mcs-tests --timeout=30m make -w -C mcs/tests run-test
${TESTCMD} --label=mcs-errors --timeout=10m make -w -C mcs/errors run-test
${TESTCMD} --label=compile-bcl-tests --timeout=40m make -w -C runtime test
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-profiler-stress-tests.sh b/scripts/ci/run-test-profiler-stress-tests.sh
index 231745151d2..4e4fa80b8e5 100755
--- a/scripts/ci/run-test-profiler-stress-tests.sh
+++ b/scripts/ci/run-test-profiler-stress-tests.sh
@@ -4,5 +4,3 @@ ${TESTCMD} --label=profiler --timeout=30m make -w -C mono/profiler -k check
${TESTCMD} --label=Mono.Profiler.Log-xunit --timeout=30m make -w -C mcs/class/Mono.Profiler.Log run-xunit-test
export MONO_BABYSITTER_EXTRA_XML=${MONO_REPO_ROOT}/acceptance-tests/profiler-stress/TestResult-profiler-stress.xml
${TESTCMD} --label=check-profiler-stress --timeout=24h make -C acceptance-tests check-profiler-stress
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-stress-tests.sh b/scripts/ci/run-test-stress-tests.sh
index 58afe9d3010..6227f9b6108 100755
--- a/scripts/ci/run-test-stress-tests.sh
+++ b/scripts/ci/run-test-stress-tests.sh
@@ -1,5 +1,3 @@
#!/bin/bash -e
${TESTCMD} --label=check-stress --timeout=12h make -w -C mono/tests -k check-stress V=1
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-testing_aot_bitcode.sh b/scripts/ci/run-test-testing_aot_bitcode.sh
index c513c353414..21928c9c71a 100755
--- a/scripts/ci/run-test-testing_aot_bitcode.sh
+++ b/scripts/ci/run-test-testing_aot_bitcode.sh
@@ -35,5 +35,3 @@ ${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run
${TESTCMD} --label=monolinker --timeout=10m make -w -C mcs/tools/linker check
rm -fr /tmp/jenkins-temp-aspnet*
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-testing_aot_bitcode_interp.sh b/scripts/ci/run-test-testing_aot_bitcode_interp.sh
index 80bb9e132a4..d01c962b0c7 100755
--- a/scripts/ci/run-test-testing_aot_bitcode_interp.sh
+++ b/scripts/ci/run-test-testing_aot_bitcode_interp.sh
@@ -26,5 +26,3 @@ ${TESTCMD} --label=System.Xml.Linq --timeout=5m make -w -C mcs/class/System.Xml.
${TESTCMD} --label=System.Numerics --timeout=5m make -w -C mcs/class/System.Numerics run-test
# ${TESTCMD} --label=System.Net.Http --timeout=5m make -w -C mcs/class/System.Net.Http run-test
${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run-test
-
-scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-testing_aot_full.sh b/scripts/ci/run-test-testing_aot_full.sh
index f7b45465191..55a5844f210 100755
--- a/scripts/ci/run-test-testing_aot_full.sh
+++ b/scripts/ci/run-test-testing_aot_full.sh
@@ -47,5 +47,3 @@ ${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run
${TESTCMD} --label=monolinker --timeout=10m make -w -C mcs/tools/linker check
rm -fr /tmp/jenkins-temp-aspnet*
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-testing_aot_full_interp.sh b/scripts/ci/run-test-testing_aot_full_interp.sh
index 2f91b0df8df..8506b3dda24 100755
--- a/scripts/ci/run-test-testing_aot_full_interp.sh
+++ b/scripts/ci/run-test-testing_aot_full_interp.sh
@@ -32,5 +32,3 @@ ${TESTCMD} --label=Mono.CSharp --timeout=5m make -w -C mcs/class/Mono.CSharp run
${TESTCMD} --label=System.Numerics --timeout=5m make -w -C mcs/class/System.Numerics run-test
${TESTCMD} --label=System.Net.Http --timeout=5m make -w -C mcs/class/System.Net.Http run-test
${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run-test
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-testing_aot_hybrid.sh b/scripts/ci/run-test-testing_aot_hybrid.sh
index 5575b36a778..42388ae10ce 100755
--- a/scripts/ci/run-test-testing_aot_hybrid.sh
+++ b/scripts/ci/run-test-testing_aot_hybrid.sh
@@ -29,5 +29,3 @@ ${TESTCMD} --label=System.Net.Http --timeout=5m make -w -C mcs/class/System.Net.
${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run-test
rm -fr /tmp/jenkins-temp-aspnet*
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-test-winaot.sh b/scripts/ci/run-test-winaot.sh
index b4e9879442d..27431e545e3 100755
--- a/scripts/ci/run-test-winaot.sh
+++ b/scripts/ci/run-test-winaot.sh
@@ -33,5 +33,3 @@ ${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run
${TESTCMD} --label=monolinker --timeout=10m make -w -C mcs/tools/linker check
rm -fr /tmp/jenkins-temp-aspnet*
-
-${MONO_REPO_ROOT}/scripts/ci/run-upload-sentry.sh
diff --git a/scripts/ci/run-upload-sentry.sh b/scripts/ci/run-upload-sentry.sh
deleted file mode 100755
index 763ea385c7b..00000000000
--- a/scripts/ci/run-upload-sentry.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash -e
-export TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
-
-if [[ ${CI_TAGS} == *'win-'* ]];
-then
- echo "Skipping telemetry phase due to arch"
-elif [ ! -f mcs/class/lib/build/upload-to-sentry.exe ]; then
- echo "Skipping telemetry phase due to missing uploader"
- ${TESTCMD} --label=sentry-telemetry-upload --skip
-else
- export MONO_SENTRY_OS="${CI_TAGS}"
- export MONO_SENTRY_URL="https://baaf612e845d407eb5f415c338bb6df9@sentry.io/1314141"
- export MONO_SENTRY_ROOT="$MONO_REPO_ROOT"
- ${TESTCMD} --label=sentry-telemetry-upload --timeout=10m make -C mcs/tools/upload-to-sentry upload-crashes
-fi
diff --git a/scripts/ci/util.sh b/scripts/ci/util.sh
index 8b2978c24f5..26519ed705c 100755
--- a/scripts/ci/util.sh
+++ b/scripts/ci/util.sh
@@ -9,71 +9,3 @@ function report_github_status {
wget -qO- --header "Content-Type: application/json" --header "Authorization: token ${GITHUB_STATUS_AUTH_TOKEN}" --post-data "{\"state\": \"$1\", \"context\":\"$2\", \"description\": \"$3\", \"target_url\": \"$4\"}" "https://api.github.com/repos/mono/mono/statuses/${ghprbActualCommit}"
}
-
-function helix_set_env_vars {
- if [[ ${CI_TAGS} != *'helix'* ]]; then return 0; fi;
-
- if [[ ${CI_TAGS} == *'-i386'* ]]; then export MONO_HELIX_ARCHITECTURE="x86";
- elif [[ ${CI_TAGS} == *'-amd64'* ]]; then export MONO_HELIX_ARCHITECTURE="x64";
- elif [[ ${CI_TAGS} == *'-arm64'* ]]; then export MONO_HELIX_ARCHITECTURE="arm64";
- elif [[ ${CI_TAGS} == *'-armel'* ]]; then export MONO_HELIX_ARCHITECTURE="armel";
- elif [[ ${CI_TAGS} == *'-armhf'* ]]; then export MONO_HELIX_ARCHITECTURE="armhf";
- else echo "Couldn't determine architecture for Helix."; return 1; fi
-
- if [[ ${CI_TAGS} == *'linux-'* ]]; then export MONO_HELIX_OPERATINGSYSTEM="Debian 9"; export MONO_HELIX_TARGET_QUEUE="Debian.9.Amd64";
- elif [[ ${CI_TAGS} == *'osx-'* ]]; then export MONO_HELIX_OPERATINGSYSTEM="macOS 10.12"; export MONO_HELIX_TARGET_QUEUE="OSX.1012.Amd64";
- elif [[ ${CI_TAGS} == *'win-'* ]]; then export MONO_HELIX_OPERATINGSYSTEM="Windows 10"; export MONO_HELIX_TARGET_QUEUE="Windows.10.Amd64";
- else echo "Couldn't determine operating system and target queue for Helix."; return 1; fi
-
- if [[ ${CI_TAGS} == *'pull-request'* ]]; then
- export MONO_HELIX_CREATOR="$ghprbPullAuthorLogin"
- export MONO_HELIX_TARGET_QUEUE="${MONO_HELIX_TARGET_QUEUE}.Open"
- export MONO_HELIX_SOURCE="pr/jenkins/mono/mono/$ghprbTargetBranch/"
- export MONO_HELIX_BUILD_MONIKER="$(git rev-parse HEAD)"
- else
- version_number=$(grep AC_INIT configure.ac | sed -e 's/AC_INIT(mono, \[//' -e 's/\],//')
- major_ver=$(echo "$version_number" | cut -d . -f 1)
- minor_ver=$(echo "$version_number" | cut -d . -f 2)
- build_ver=$(echo "$version_number" | cut -d . -f 3)
- blame_rev=$(git blame configure.ac HEAD | grep AC_INIT | sed 's/ .*//')
- patch_ver=$(git log "$blame_rev"..HEAD --oneline | wc -l | sed 's/ //g')
- export MONO_HELIX_CREATOR="monojenkins"
- export MONO_HELIX_SOURCE="official/mono/mono/$MONO_BRANCH/"
- export MONO_HELIX_BUILD_MONIKER=$(printf %d.%d.%d.%d "$major_ver" "$minor_ver" "$build_ver" "$patch_ver")
- fi
-}
-
-function helix_send_build_start_event {
- if [[ ${CI_TAGS} != *'helix-telemetry'* ]]; then return 0; fi;
- if [ -z "$1" ]; then echo "No type."; return 1; fi;
-
- url="https://helix.dot.net/api/2018-03-14/telemetry/job"
-
- # we need an API key for non-PR builds
- if [[ "${MONO_HELIX_SOURCE}" != "pr/"* ]]; then
- if [ -z "$MONO_HELIX_API_KEY" ]; then echo "No Helix API key."; return 1; fi;
- url="${url}?access_token=${MONO_HELIX_API_KEY}"
- fi
-
- mkdir -p "helix-telemetry/${1}"
- wget -O- --method="POST" --header='Content-Type: application/json' --header='Accept: application/json' --body-data="{
- \"QueueId\": \"Build\",
- \"Source\": \"${MONO_HELIX_SOURCE}\",
- \"Type\": \"${1}\",
- \"Build\": \"${MONO_HELIX_BUILD_MONIKER}\",
- \"Properties\": { \"architecture\": \"${MONO_HELIX_ARCHITECTURE}\", \"operatingSystem\": \"${MONO_HELIX_OPERATINGSYSTEM}\"}
- }" "${url}" > "helix-telemetry/${1}/job-token.txt"
- helix_job_token=$(cat "helix-telemetry/${1}/job-token.txt" | sed 's/"//g')
-
- wget -O- --method="POST" --header='Accept: application/json' --header="X-Helix-Job-Token: ${helix_job_token}" "https://helix.dot.net/api/2018-03-14/telemetry/job/build?buildUri=${BUILD_URL//+/%2B}" > "helix-telemetry/${1}/build-id.txt"
-}
-
-function helix_send_build_done_event {
- if [[ ${CI_TAGS} != *'helix-telemetry'* ]]; then return 0; fi;
- if [ -z "$1" ]; then echo "No type."; return 1; fi;
- if [ -z "$2" ]; then echo "No error count."; return 1; fi;
-
- helix_job_token=$(cat "helix-telemetry/${1}/job-token.txt" | sed 's/"//g')
- helix_build_id=$(cat "helix-telemetry/$1/build-id.txt" | sed 's/"//g')
- wget -O- --method="POST" --header='Accept: application/json' --header="X-Helix-Job-Token: ${helix_job_token}" "https://helix.dot.net/api/2018-03-14/telemetry/job/build/${helix_build_id}/finish?errorCount=${2}&warningCount=0"
-}