Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .azure-pipelines/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,14 @@ def poll(self, test_plan_id, interval=60, timeout=-1, expected_states=""):
required=False,
help="Token to download the repo from Azure DevOps"
)
parser_create.add_argument(
"--azp-pr-id",
type=str,
dest="azp_pr_id",
default="",
required=False,
help="Pullrequest ID from Azure Pipelines"
)

parser_poll = subparsers.add_parser("poll", help="Poll test plan status.")
parser_cancel = subparsers.add_parser("cancel", help="Cancel running test plan.")
Expand Down Expand Up @@ -422,7 +430,7 @@ def poll(self, test_plan_id, interval=60, timeout=-1, expected_states=""):
env["client_secret"])

if args.action == "create":
pr_id = os.environ.get("SYSTEM_PULLREQUEST_PULLREQUESTNUMBER")
pr_id = args.azp_pr_id if args.azp_pr_id else os.environ.get("SYSTEM_PULLREQUEST_PULLREQUESTNUMBER")
repo = os.environ.get("BUILD_REPOSITORY_PROVIDER")
reason = os.environ.get("BUILD_REASON")
build_id = os.environ.get("BUILD_BUILDID")
Expand Down