chore(ci): test triggers

This commit is contained in:
Marc Durdin 2020-02-10 07:48:00 +11:00
parent 829fa8469a
commit df86a608ef
2 changed files with 20 additions and 8 deletions

View file

@ -27,7 +27,8 @@ function triggerBuild() {
if [[ $# -gt 2 ]]; then
local TEAMCITY_BRANCH_NAME="$3"
TEAMCITY_BRANCH_NAME="branchName='$TEAMCITY_BRANCH_NAME'"
echo " Triggering build for: $TEAMCITY_BRANCH_NAME"
TEAMCITY_BRANCH_NAME="branchName='$TEAMCITY_BRANCH_NAME' defaultBranch='false'"
else
local TEAMCITY_BRANCH_NAME=
fi
@ -35,11 +36,15 @@ function triggerBuild() {
local GIT_OID=`git rev-parse HEAD`
local TEAMCITY_SERVER=https://build.palaso.org
local command="<build><buildType id='$TEAMCITY_BUILDTYPE' $TEAMCITY_BRANCH_NAME /><lastChanges><change vcsRootInstance='$TEAMCITY_VCS_ID' locator='version:$GIT_OID,buildType:(id:$TEAMCITY_BUILDTYPE)'/></lastChanges></build>"
echo "Call: $command"
curl -s --header "Authorization: Bearer $TEAMCITY_TOKEN" \
-X POST \
-H "Content-Type: application/xml" \
-H "Accept: application/json" \
-H "Origin: $TEAMCITY_SERVER" \
$TEAMCITY_SERVER/app/rest/buildQueue \
-d "<build><buildType id='$TEAMCITY_BUILDTYPE' $TEAMCITY_BRANCH_NAME /><lastChanges><change vcsRootInstance='$TEAMCITY_VCS_ID' locator='version:$GIT_OID,buildType:(id:$TEAMCITY_BUILDTYPE)'/></lastChanges></build>"
-d "$command"
}

View file

@ -26,12 +26,19 @@ watch_windows='common|developer|web'
# One day we may have tests that run on all platform changes
bc_test_all=()
bc_test_android=(KeymanAndroid_TestPullRequests KeymanAndroid_TestSamplesAndTestProjects)
bc_test_ios=(Keyman_iOS_TestPullRequests Keyman_iOS_TestSamplesAndTestProjects)
bc_test_linux=(KeymanLinux_TestPullRequests Keyman_Common_KPAPI_TestPullRequests_Linux)
bc_test_mac=(Keyman_KeymanMac_PullRequests Keyman_Common_KPAPI_TestPullRequests_macOS)
bc_test_windows=(KeymanDesktop_TestPullRequests KeymanDesktop_TestPrRenderOnScreenKeyboards Keyman_Common_KPAPI_TestPullRequests_Windows)
bc_test_web=(Keymanweb_TestPullRequests Keyman_Common_LMLayer_TestPullRequests)
bc_test_android=(KeymanAndroid_TestPullRequests)
bc_test_ios=()
bc_test_linux=()
bc_test_mac=()
bc_test_windows=()
bc_test_web=()
# bc_test_android=(KeymanAndroid_TestPullRequests KeymanAndroid_TestSamplesAndTestProjects)
# bc_test_ios=(Keyman_iOS_TestPullRequests Keyman_iOS_TestSamplesAndTestProjects)
# bc_test_linux=(KeymanLinux_TestPullRequests Keyman_Common_KPAPI_TestPullRequests_Linux)
# bc_test_mac=(Keyman_KeymanMac_PullRequests Keyman_Common_KPAPI_TestPullRequests_macOS)
# bc_test_windows=(KeymanDesktop_TestPullRequests KeymanDesktop_TestPrRenderOnScreenKeyboards Keyman_Common_KPAPI_TestPullRequests_Windows)
# bc_test_web=(Keymanweb_TestPullRequests Keyman_Common_LMLayer_TestPullRequests)
# Keymanweb_TestPullRequestRegressions : currently this is timing out so disabled until we have
# time to investigate further