Enable local deployments in Pull Requests
I've just been setting up local deployment to execute our suite of integration tests as part of the build.
I've now got it all working, but I've found that the deployments don't execute on forked pull requests.
I appreciate this is by design, but I wonder if it could be enabled similar to the "Enable secure variables in Pull Requests", something like "Enable local deployments in Pull Requests"?
We deploy both a website and a SSDT Package to create a databse as described here, so would require al types of local deploy to be enabled.
Do you think this is a worthwhile feature?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 26 Feb, 2015 11:09 PM
Would it work if we add "Enable all deployments in Pull Requests" for private projects?
Support Staff 2 Posted by Feodor Fitsner on 27 Feb, 2015 05:18 AM
OK, deployed an update with Enable deployments in Pull Requests project option for private GitHub projects.
3 Posted by James Skimming on 27 Feb, 2015 08:18 AM
Thanks for the quick turnaround, I've tried it and it's working, but not quite as I'd expect.
We have three deployments, expressed like this in the yml
The last environment is the QA environment (an Azure WebSite) that we only want to deploy when pull requests are accepted and merged. Since I've specified it only deploys on the master branch, I don't expect it to be deployed on PRs that have not been merged to master.
I suspect it's related, but I've always found it confusing that PR builds show the destination branch as the branch.
This is why I named the request "Enable local deployments in Pull Requests", I've no problem with it being all, as long as the branch restriction on deployments prevents PRs from deploying before they have been merged.
Support Staff 4 Posted by Feodor Fitsner on 27 Feb, 2015 05:20 PM
Yeah, I got it. But if it was just "Local" deployment provider it would be easier, but you also mentioned "SqlDatabase" where there is no way to detect whether you are targeting local SQL Server or Azure SQL or something else :)
To prevent deploying to QA environment during pull request builds you could just use conditional variable. Basically, you can tell that provider deploy only if it's not PR. To do that define new environment variable with PowerShell like that:
then add this condition to deployment provider:
5 Posted by James Skimming on 27 Feb, 2015 06:01 PM
Great! That's working exactly as we need, we now have this in the build output
I really appreciate your help on this :-)
James Skimming closed this discussion on 27 Feb, 2015 06:02 PM.