gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
13.02k stars 1.25k forks source link

Move config to `.gitpod` folder #729

Open svenefftinge opened 5 years ago

svenefftinge commented 5 years ago

As suggested here we should put the gitpod config below .gitpod. It will reduce the noise on the top level, as most setups use two config files (.gitpod.yml, .gitpod.Dockerfile).

asomervell commented 5 years ago

Yeah so i'd just see at least

/.gitpod/config.yml (or anything / *.yml)
/.gitpod/Dockerfile

And it gives rise in the future to being able to have scripts and things in subfolders

/.gitpod/startup/run_some_test.sh
JesterOrNot commented 5 years ago

Any updates on this?

RDIL commented 4 years ago

Can we please add this and also support .theia? This is something I really really really want.

JesterOrNot commented 4 years ago

@RDIL can you elaborate? .theia is already a folder!

RDIL commented 4 years ago

No I mean putting .theia in .gitpod for ultra organization

Kreyren commented 4 years ago

or ideally allowing to specify the location of those files by the user and standardize one directory that is used by default if end-user doesn't override it.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

csweichel commented 3 years ago

To make this happen we'd have to at least:

We'd also have to agree on some conventions:

Lastly, we should think about a way to migrate old configurations, or do we want to support both modes indefinitely?

svenefftinge commented 3 years ago

We should keep the gitpod.yml filename to make it easier talking about it, no matter it sits top-level or below .gitpod/. We also should support both .yml and .yaml it would be very confusing if you got the extension wrong and gitpod just ignores it. The checking order (priority) should be

We can get everyone towards .gitpod/gitpod.yaml by deprecating all other variants and providing a quick fix.

The gp init CLI should create a scaffolding for .gitpod/gitpod.yaml.

akosyakov commented 3 years ago

Just fyi: Theia and Code expects .gitpod.yml to be in checkout location. Maybe it would be better to enhance the supervisor info endpoint to provide a URL to the config.

shaal commented 3 years ago

Would it be possible to get this feature in, before the next Gitpod release?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

shaal commented 3 years ago

Requesting to add meta: never-stale label to this issue. I think this feature is important, is it going to be implemented?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

shaal commented 3 years ago

Requesting to add meta: never-stale label to this issue. I think this feature is important, is it going to be implemented?

shaal commented 2 years ago

I still wish we can get this feature. Everything related to Gitpod, under .gitpod/ directory.

jldec commented 2 years ago

Tracking under developer experience in https://github.com/orgs/gitpod-io/projects/20/views/10

shaal commented 2 years ago

Checking on the status of this feature request, can it be scheduled?

ericsampson commented 2 years ago

Shouldn’t files go into a .gitpod folder? .github is for GitHub config files etc, not a dumping ground for everyone AFAIK?

shaal commented 2 years ago

@ericsampson AFAIK this whole issue is all about moving Gitpod config files to .gitpod folder.

cart commented 2 years ago

I'd personally love it if we could put .gitpod.yml into our .github folder. We've been discussing adopting gitpod for Bevy Engine (https://github.com/bevyengine/bevy/pull/4700), but we like to keep our root directory as clean as possible. A .gitpod folder doesn't solve this problem for us as it still increases the noise at the root.

ericsampson commented 2 years ago

@cart why not both :)

Seems like it would be relatively easy and desirable for the feature to be: "check for X files in root folder, then check in .gitpod, then check in .github"

pattacini commented 2 years ago

"check for X files in root folder, then check in .gitpod (if present), then check in .github (if present)"

This would be definitely great as it will guarantee back-compatibility.

ericsampson commented 2 years ago

Based on @svenefftinge design above I would propose this update:

The checking order (priority) should be

.gitpod/gitpod.yaml .gitpod.yml # legacy .gitpod.yaml # confused legacy .gitpod/gitpod.yml .github/gitpod.yaml .github/gitpod.yml

cart commented 2 years ago

Yup that sounds great to me!

szab100 commented 2 years ago

Personally, I think it is nice and clean as it is today and adding such a checking order would increase the noise.

I have always been using the following structure:

I feel this is the cleanest for both humans & reading programmatically (think of enterprise self-hosted users with custom infra elements aimed at detecting or dealing with "gitpodized" git repositories), since there is always a single, fixed starting point, no need to replicate the checking order logic. Where all the helper files are stored should really be a user preference, while official Gitpod docs and examples should consistently promote a clean structure.

Either way, just my 2-cents.

jacobparis commented 2 years ago

I'd like to see tools adopt a /config convention as a place to put their configuration files. I think it would only take a few big players to start before other tools follow suit

config:
  .gitpod.yml
  .gitpod.Dockerfile
  .eslintrc
  .prettierrc