Skip to content

darkato42/azure-repo-badge-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

azure-repo-badge-proxy

Example badges:

example

This service is implemented as a serverless edge function using Netlify Edge Functions. It fetchs the last build info (sourceBranch and version) given buildNumber=*alpha* or tagFilters=stable from Azure DevOps REST API. A second call was made to get the build badge. Azure API Endpoints used are below:

Deployment to Netlify

  1. Import your project from a GitHub repository
  2. Create an Azure PAT with the Build (Read) permission.
  3. Add an environment variable in Netlify site settings named AZURE_PAT with the PAT value above.
  4. The CI/CD should work by default.

Azure Pipeline Build Tasks

  1. GitVersion.Tool is installed as a dotnet tool

  2. Run the gitversion dotnet CLI command in pipelines.

    dotnet gitversion /updateassemblyinfo /output buildserver
    

    This task will update the build number so alpha and beta can be searched with wildcards.

  3. Stable builds doesn't have a searchable keyword. An alternative is to add a stable tag to the build. add-tag-to-build

Embed build badges in markdown

  • Alpha
    ![Project.Lib](https://azure-badge-proxy.netlify.app/fetch-azure-badge/org/project/1?name=Project.Lib&buildNumber=*alpha*)
    
  • Beta
    ![Project.Lib](https://azure-badge-proxy.netlify.app/fetch-azure-badge/org/project/1?name=Project.Lib&buildNumber=*beta*)
    
  • Stable
    ![Project.Lib](https://azure-badge-proxy.netlify.app/fetch-azure-badge/org/project/1?name=Project.Lib&tagFilters=stable)
    

About

Show versions in Azure DevOps build badges

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published