Open jdalton opened 7 years ago
Are you trying to deploy a Web App or something else? Slingshot is primarily for Web Apps. For other scenarios, there is similar support in the portal. See https://github.com/Azure/azure-quickstart-templates for a sample repo that uses that. And that one has buttons in multiple folders, which sounds like what you want.
Are you trying to deploy a Web App or something else?
The repo is a collection of web apps (sdk examples). Each folder as a separate small web app. We're wanting to give the visitor an easy way to deploy each sample (so as if it was an individual repo). Since it's a collection having a separate repo for each would be harder to manage.
Please try the same pattern as in that repo, with buttons (and matching arm templates) in multiple folders.
Cool 😎, will do!
Update: In the github deploy example how would I specify starting from a directory within the repo?
I thought there was some magic that automatically did this based on the folder that the button is on, but I might be wrong. @Tuesdaysgreen might remember.
Here's an example of how it works with a sub folder: https://github.com/Tuesdaysgreen/HelloWorldDemo/tree/master/subdir
However, based on the example you're looking at, it doesn't look like you're using slingshot. It looks like you're using the official Azure deploy button, which is a different project.
That other link is something I pointed him to because I didn't have a slingshot sample and I figure it basically worked the same way.
Thanks @Tuesdaysgreen, I think this will do it!
Ah, after checking that still deploys to the root of the repo. So it will create and load https://helloworlddemo84b2.azurewebsites.net/ but not point to https://helloworlddemo84b2.azurewebsites.net/subdir/.
I think you are misunderstanding the feature. The bits are always deployed at the root of the site, but the point is that it is only deploying what's in the relevant folder. At least that's what it should be doing.
@Tuesdaysgreen, your test repo is not ideal because https://github.com/Tuesdaysgreen/HelloWorldDemo/blob/master/index.html and https://github.com/Tuesdaysgreen/HelloWorldDemo/blob/master/subdir/index.html are identical, so it's not obvious which one got deployed :)
The bits are always deployed at the root of the site, but the point is that it is only deploying what's in the relevant folder. At least that's what it should be doing.
That would be rad (that's my desired behavior). I don't think that's happening at the moment. I believe it's just deploying the root in this case (since the path to subdir still resolves). I tried this on another project and it looks like it's deploying the root on it too despite originating from a nested folder.
Indeed, it doesn't seem to work.
I'm wanting to add a deploy to Azure button to projects in a monorepo (multiple packages in a single repo) and wondering what the best advice is. A monorepo looks like this or this.
Update: Click here to jump to the bug.