Skip to content

Azure Pipelines: In Cloud Shell, running a pipeline with the --open option doesn't spawn a new browser tab #18321

Open

Description

Describe the bug
When you enter the command az pipelines run --id <id_number> --open, a browser tab is supposed to open. The spawned tab will contain the new pipeline run's results page. The browser tab does open when I enter the command from my local Git Bash installation, but it doesn't open when I enter the command in a Cloud Shell (Bash) environment.

I wrote an article where I had to use this command, but because of this issue, I had to create a workaround by outputting the URL that the page opens, and telling the user to open that URL if the new tab doesn't appear.

To Reproduce

  1. Go to https://docs.microsoft.com/azure/devops/pipelines/scripts/cli/pipeline-variable-group-secret-nonsecret-variables (a sample article that I authored on Microsoft Docs),
  2. Follow the instructions in the Sample script section by:
    • Saving and pushing the YAML file to your remote GitHub repository.
    • Filling in the placeholders in the Azure CLI code (there are 7 of them).
    • Saving or uploading the Azure CLI code to a file in Cloud Shell (Bash).
    • Entering bash <scriptname>.sh in Cloud Shell to run the script.

You'll eventually see output similar to the following, but a new browser tab with the pipeline results does not spawn:

Go to the pipeline run's web page to view the output results for the 1st run.
If the web page doesn't automatically appear, go to:
    https://dev.azure.com/v-dele/74a24d9d-c15a-4749-84f1-82b0ce81d3d7/_build/results?buildId=207
Press Enter to change the value of one of the variable group's nonsecret variables, then run again:

Expected behavior
A new browser tab automatically opens that shows the results of the new pipeline run.

Environment summary

  • An Azure DevOps personal access token
  • An Azure DevOps account or organization (in https://dev.azure.com)
  • Your own GitHub repository (to save the pipeline scripts)
  • Cloud Shell (https://shell.azure.com) using the Bash option

Additional context
If there are other Azure CLI commands that spawn a browser tab, they may also be hindered by this issue.

Cc: @dbradish-microsoft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions