Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect deployed git HEAD in azure #213

Merged
merged 1 commit into from
Oct 31, 2014
Merged

detect deployed git HEAD in azure #213

merged 1 commit into from
Oct 31, 2014

Conversation

bewest
Copy link
Member

@bewest bewest commented Oct 31, 2014

When deployed on MS azure, the available git commit used to deploy the
software is available in the SCM_COMMIT_ID environment variable.
We encourage all hosting providers to provide some similar facility to
avoid spawning spurious processes.

Thanks to @shanselman for reminders and pointers to the fix.

When deployed on MS azure, the available git commit used to deploy the
software is available in the SCM_COMMIT_ID environment variable.
We encourage all hosting providers to provide some similar facility to
avoid spawning spurious processes.

Thanks to @shanselman for reminders and pointers to the fix.
@bewest
Copy link
Member Author

bewest commented Oct 31, 2014

davidebbo commented on Sep 17
/Env/ only shows the global environment. But this one is very specific to one deployment, and it only available to the deployment script (and its child processes).
Matthew Steeples
MatthewSteeples commented on Sep 17
Ah that makes sense then. I'm trying to get it at runtime of the site to display on a page. Is a reason this isn't enabled? Am I going to be better off putting it in the msbuild task to embed it somewhere?
David Ebbo
Owner
davidebbo commented on Sep 17
Two approaches:

During deployment, read this env and write the commit id to some file under your app's code (e.g. App_Data) that your runtime can read
Directly go after %home%\site\deployments\active which has the commit id
I suspect 2. is easier, though technically. it makes assumptions about the Kudu file structures that theoretically could change (but probably won't).

@bewest bewest mentioned this pull request Oct 31, 2014
@jasoncalabrese
Copy link
Member

👍

bewest added a commit that referenced this pull request Oct 31, 2014
@bewest bewest merged commit 9c229c2 into dev Oct 31, 2014
@jasoncalabrese jasoncalabrese deleted the wip/azure/git-head branch February 8, 2015 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants