CI add issue tracking to Windows builds
@@ -54,3 +54,27 @@ jobs:
testRunTitle: ${{ format('{0}-$(Agent.JobName)', parameters.name) }}
displayName: 'Publish Test Results'
condition: succeededOrFailed()
+ - bash: |
+ set -ex
+ if [[ $(BOT_GITHUB_TOKEN) == "" ]]; then
+ echo "GitHub Token is not set. Issue tracker will not be updated."
+ exit
+ fi
+
+ LINK_TO_RUN="https://dev.azure.com/$BUILD_REPOSITORY_NAME/_build/results?buildId=$BUILD_BUILDID&view=logs&j=$SYSTEM_JOBID"
+ CI_NAME="$SYSTEM_JOBIDENTIFIER"
+ ISSUE_REPO="$BUILD_REPOSITORY_NAME"
+
+ $(pyTools.pythonLocation)/bin/pip install defusedxml PyGithub
+ $(pyTools.pythonLocation)/bin/python maint_tools/update_tracking_issue.py \
+ $(BOT_GITHUB_TOKEN) \
+ $CI_NAME \
+ $ISSUE_REPO \
+ $LINK_TO_RUN \
+ --junit-file $JUNIT_FILE \
+ --auto-close false
+ displayName: 'Update issue tracker'
+ env:
+ JUNIT_FILE: $(TEST_DIR)/$(JUNITXML)
+ condition: and(succeededOrFailed(), eq(variables['CREATE_ISSUE_ON_TRACKER'], 'true'),
+ eq(variables['Build.Reason'], 'Schedule'))
