-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Detecting which URL was used to spin-up the Gitpod Environment #14923
Comments
Hi @Kwok-he-Chu, what you're trying to do here is possible (maybe it's not just obvious to a new user). See: https://github.com/gitpod-io/template-dynamic-workspace-location-and-tasks |
Thanks for the swift response @axonasif, I'll take a look! |
Not sure if this falls under IDE team, but put it to your inbox (IDE team). Possibly related issue: |
The solution above worked flawlessly, thank you for providing a clear example @axonasif Are there any future plans of including this information in (for example) an Gitpod environmental variable? |
Great to hear! That's something @loujaybee could help with I think 🙏 |
Env vars are subject to change. There are 2 primary means of getting info supervisor API and gp cli. It is already possible to fetch via supervisor API: Adding it to |
Nice! Thanks for sharing, something new I learned 😁 |
Thank you for the efforts on this @Kwok-he-Chu! I see that the the IDE team was requested a review, so I'll leave it to them 🙏 |
Is your feature request related to a problem? Please describe
I have multiple applications that can be spun up within the same repository.
Describe the behaviour you'd like
I would like gitpod to run a specific application on-startup. If there are multiple applications, it should be based off where the user came from (see example below). Ideally: Gitpod is aware from which subfolder it spun-up its environment (through URL parameters perhaps?).
Describe alternatives you've considered
Having multiple gitpod files support that can be placed within subfolders (gitpod only looks at the /root for the .gitpod.yml file)
Tried placing the .gitpod.yml file in multiple subfolders.
Detecting which URL was used to spin-up the environment (I couldn't find anything about this in the documentation)
For example:
gitpod.io#https://github.com/gitpod-io/gitpod/tree/main/dev
would know it came from the subfolder:/main/dev/
.I can then write a gitpod script/command that checks the origin url and run the application automatically.
Current solution:
Foreach application within the subfolder, I tell the user to execute a specific command in the Terminal
The text was updated successfully, but these errors were encountered: