MAINT Open issue on tracker for pypy errors
@@ -36,6 +36,7 @@ jobs:
DISTRIB: ''
DOCKER_CONTAINER: ''
SHOW_SHORT_SUMMARY: 'false'
+ CREATE_ISSUE_ON_TRACKER: 'false'
CCACHE_DIR: $(Pipeline.Workspace)/ccache
CCACHE_COMPRESS: '1'
strategy:
@@ -105,3 +106,32 @@ jobs:
docker container stop skcontainer
displayName: 'Stop container'
condition: always()
+ - task: UsePythonVersion@0
+ inputs:
+ versionSpec: '3.9'
+ displayName: Place Python into path to update issue tracker
+ condition: and(succeededOrFailed(), eq(variables['CREATE_ISSUE_ON_TRACKER'], 'true'),
+ eq(variables['Build.Reason'], 'Schedule'))
+ - 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"
+
+ pip install defusedxml PyGithub
+ python maint_tools/update_tracking_issue.py \
+ $(BOT_GITHUB_TOKEN) \
+ $CI_NAME \
+ $ISSUE_REPO \
+ $LINK_TO_RUN \
+ --junit-file $JUNIT_FILE
+ 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'))
