Skip to content

fix(ci): Support Azure DevOps classic release pipeline links - #868

Merged
epszaw merged 1 commit into
allure-framework:mainfrom
twitthoeft-gls:fix/azure-devops-classic-release-pipeline
Aug 14, 2026
Merged

fix(ci): Support Azure DevOps classic release pipeline links#868
epszaw merged 1 commit into
allure-framework:mainfrom
twitthoeft-gls:fix/azure-devops-classic-release-pipeline

Conversation

@twitthoeft-gls

@twitthoeft-gls twitthoeft-gls commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Context

The Azure DevOps CI detector produces broken report links when running inside classic release pipelines.

image

The detector reads SYSTEM_COLLECTIONURI and builds a URL from it, but in classic releases Azure DevOps sets that variable to the VSRM API endpoint (vsrm.dev.azure.com) rather than the portal host (dev.azure.com). Combined with SYSTEM_TEAMPROJECTID being a GUID instead of a project name, and the path being hardcoded to _build/results, the result is a link that goes nowhere:

https://vsrm.dev.azure.com/myorg//2c7640cb-dbdc-4d89-98e6-98a71042ec75/_build/results?buildId=50548

This PR works by checking for the existence of the RELEASE_RELEASEID environment variable and then uses all of the RELEASE_* env vars documented here for link generation instead. It will a produce a url following this pattern.

https://dev.azure.com/{org}/{project}/_release?releaseId={RELEASE_RELEASEID}&_a=release-summary

Env var Getter Used for
RELEASE_RELEASEID jobRunUid Unique run identifier for history tracking
RELEASE_RELEASEWEBURL jobRunUrl Clickable link to the release in Azure DevOps portal
RELEASE_RELEASENAME jobRunName Display text shown on the link in the report header
RELEASE_DEFINITIONNAME jobName Pipeline name label in the report

Currently, Allure 3 already works with the modern YAML Build pipelines. This backports working links into the older Classic Release style. The switch to YAML Build pipelines happened in 2019. I made sure to avoid regressing the link building of the newer-style Build pipeline. Newer style build behavior is unchanged because the RELEASE_* variables this fix uses do not exist outside of classic release stages.

Tested on cloud-hosted Azure DevOps Services; on-prem Azure DevOps Server behavior should be identical but is untested. YMMV

Note: In Azure DevOps, one classic release has multiple environments. This link will take you to the release overview. We can get users closer to the test results by building environment-level links, but I wanted to keep this first round very simple. Thanks.

Checklist


return getBuildID();
},

@twitthoeft-gls twitthoeft-gls Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to use an existing CI env var for the link url here. We could build a deeper link into the release environment, getting users closer to the test results. But, wanted to keep the fix simple to start.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense :)

@epszaw

epszaw commented Aug 14, 2026

Copy link
Copy Markdown
Member

@twitthoeft-gls thank you for the contribution!

@epszaw epszaw added the pr:bug label Aug 14, 2026
@epszaw
epszaw merged commit 9485304 into allure-framework:main Aug 14, 2026
9 of 30 checks passed
@twitthoeft-gls
twitthoeft-gls deleted the fix/azure-devops-classic-release-pipeline branch August 14, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants