@@ -23,12 +23,12 @@ jobs:
2323 addToPath : true
2424 architecture : ' x64'
2525 - bash : |
26- # verify $ISSUE_LINK and $BASE_BRANCH is not null
26+ # verify $ISSUE_LINK and $BASE_BRANCH are not null
2727 if [ -z "$(BASE_BRANCH)" -o -z "$(ISSUE_LINK)" ]; then
2828 echo "ISSUE_LINK or BASE_BRANCH do not exist, pipeline fail!!!"
2929 exit 1
3030 fi
31-
31+
3232 script_path=$(pwd)/scripts/auto_release
3333 cd ..
3434 git config --global user.email "PythonSdkPipelines"
@@ -66,28 +66,24 @@ jobs:
6666 exit 1
6767 fi
6868
69- test_result=""
69+ test_result="Live test success "
7070 if [ -f "$output_path/live_test_fail.txt" ]; then
7171 test_result="Live test fail, detailed info is in pipeline log(search keyword FAILED)!!!\n"
7272 fi
7373
7474 # create PR
75- new_branch=`sed -n '1p' $output_path/output.txt`
76- target_branch=`sed -n '2p' $output_path/output.txt`
77- curl \
78- --user "anything:$(USR_TOKEN)" \
79- -d "{\
80- \"title\":\"[AutoRelease] $new_branch(Do not merge)\",\
81- \"body\":\"$test_result $(ISSUE_LINK) \",\
82- \"head\":\"$(USR_NAME):$new_branch\",\
83- \"base\":\"$target_branch\"\
84- }" \
85- https://api.github.com/repos/Azure/azure-sdk-for-python/pulls
75+ export NEW_BRANCH=`sed -n '1p' $output_path/output.txt`
76+ export TARGET_BRANCH=`sed -n '2p' $output_path/output.txt`
77+ export ISSUE_LINK=$(ISSUE_LINK)
78+ export USR_NAME=$(USR_NAME)
79+ export USR_TOKEN=$(USR_TOKEN)
80+ export TEST_RESULT=$test_result
8681
82+ python $script_path/create_auto_release_pr.py
8783 echo "\'[AutoRelease] $new_branch \' has been created!!!"
8884
8985 # if test fail, still push and crete PR. But pipeline would fail to remind user
9086 if [ -f "$output_path/live_test_fail.txt" ]; then
91- echo "please fix failure test!!! $(ISSUE_LINK) \'[AutoRelease] $new_branch \' has been created!!!"
87+ echo "please fix failure test $(ISSUE_LINK)!!! \'[AutoRelease] $new_branch \' has been created!!!"
9288 exit 1
9389 fi
0 commit comments