I have deployed a website containing react as front end and node as back end using azure devops in azure vm and its working perfect. now i want to display build number & release number in page footer of the website. can anyone help with it, i'm quite new to azure devops so not able to find any helping solution.
Edit: as suggested i have added below variables to my ci pipeline as can be seen here
and in my code i have tried to add them to footer as you can see here
but the output i'm getting is here
can't get where i'm going wrong, in the code image you can see i have used one azure devops link to get build number value but i'm not sure how to get that link, i have followed this blog, can someone help on it
In the build pipeline, you can use the predefined variable
Build.BuildNumber
to get the build number of current build. For more details, you can see here.And in the release pipeline, you can use the predefined variable
Release.ReleaseName
to get the release name (release number) of current release. For more details, you can see here.In the pipelines, you can use the predefined variables to get the values you require and write them into the code of your web app to set the page footer.
Maybe, you can try to develop a script to write the build number and release name into the code of your web app, and call this script in the build pipeline and release pipeline.