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

bug: subdir support not working as expected #76

Open
jdalton opened this issue Mar 15, 2017 · 12 comments
Open

bug: subdir support not working as expected #76

jdalton opened this issue Mar 15, 2017 · 12 comments

Comments

@jdalton
Copy link

jdalton commented Mar 15, 2017

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.

@davidebbo
Copy link
Member

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.

@jdalton
Copy link
Author

jdalton commented Mar 29, 2017

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.

@davidebbo
Copy link
Member

Please try the same pattern as in that repo, with buttons (and matching arm templates) in multiple folders.

@jdalton
Copy link
Author

jdalton commented Mar 29, 2017

Cool 😎, will do!

Update:
In the github deploy example how would I specify starting from a directory within the repo?

@davidebbo
Copy link
Member

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.

@ehamai
Copy link
Contributor

ehamai commented Mar 31, 2017

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.

@davidebbo
Copy link
Member

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.

@jdalton
Copy link
Author

jdalton commented Mar 31, 2017

Thanks @Tuesdaysgreen, I think this will do it!

@jdalton
Copy link
Author

jdalton commented Mar 31, 2017

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/.

@davidebbo
Copy link
Member

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 :)

@jdalton
Copy link
Author

jdalton commented Mar 31, 2017

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.

@davidebbo
Copy link
Member

Indeed, it doesn't seem to work.

@jdalton jdalton changed the title mono-repo support bug: subdir support not working as expected Apr 4, 2017
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

No branches or pull requests

3 participants