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

feat: add gitpod config #15034

Merged
merged 1 commit into from
Jun 25, 2019
Merged

feat: add gitpod config #15034

merged 1 commit into from
Jun 25, 2019

Conversation

svenefftinge
Copy link
Contributor

@svenefftinge svenefftinge commented Jun 21, 2019

Hey Gatsby folks 👋

this PR adds support for onboarding contributors through Gitpod, a free online dev environment. The PR will allow anyone to get up and running with a browser-based dev environment in a few seconds, lowering the barrier for any code contributions.

This is what a dev environment looks like:
Screenshot 2019-06-21 at 19 35 27

The environment starts with a pre-built state of the given branch. On startup three processes are started in three different terminals watching changes in core and the example I picked (gatsbygram). All is based on a configuration file (.gitpod.yml) so hopefully pretty transparent. In case it is not, we're always happy to help.

Give it a try: https://gitpod.io/#https://github.com/svenefftinge/gatsby

Shaving off the local setup and a five minutes of build, I hope this will streamline your onboarding process a lot.

I also added a proposal for documentation. So if you think this is useful, please advice how and where you'd prefer to see information about this and of course feedback on the configuration would be great, too.

P.S.: Awesome framework! We really enjoyed building our website with Gatsby.

@svenefftinge svenefftinge requested a review from a team as a code owner June 21, 2019 19:16
@svenefftinge svenefftinge requested a review from a team June 21, 2019 19:16
@svenefftinge svenefftinge requested a review from a team as a code owner June 21, 2019 19:16
@svenefftinge
Copy link
Contributor Author

The failed unit_test_windows build says:

$ babel-node scripts/check-versions.js
gatsby-page-utils: 
  Depends on "babel-preset-gatsby-package@^0.1.4" 
  instead of "babel-preset-gatsby-package@0.2.0". 

I don't think that has anything to do with my change. Is the build a bit flaky?

@pieh
Copy link
Contributor

pieh commented Jun 23, 2019

This is awesome! On my test I think it took ~2 minutes to get env ready which is pretty sweet.

The config file seems straight forward (at least to modify test site to something else than gatsbygram). I do have a question - is there a way to provide multiple presets (using different example sites)? Flow I could see working - if you want to work on gatsby-transformer-remark - you probably would want to use using-remark example, but if you want to work on gatsby-source-wordpress, you would want to use using-wordpress etc.

I really need to take Code Review feature for a spin - this sounds awesome

I don't think that has anything to do with my change. Is the build a bit flaky?

This is pretty weird. Definitely not related to the PR content. Don't worry about this. Only check that we need to make sure is passing is linting, and this is green, so all good!

@rayriffy
Copy link
Contributor

Is the file name docs/contributing/using-an-onlie-dev-environment.md mistyped?

@svenefftinge
Copy link
Contributor Author

Flow I could see working - if you want to work on gatsby-transformer-remark - you probably would want to use using-remark example, but if you want to work on gatsby-source-wordpress, you would want to use using-wordpress etc.

That's a great idea. We can pass an environment variable in to overwrite the default example (gatsbygram). We could put buttons into the individual example Readmes.

@svenefftinge
Copy link
Contributor Author

On my test I think it took ~2 minutes

Still pretty long, it usually was more like 40 seconds for me. But it might be because Gitpod runs in three regions (US, Europe, Asia) and I created the prebuilt in Europe, which is a big tar of the full workspaces including all node dependencies. If you start it from US it has to be transferred there first.

Prebuilds that are automatically triggered from the GitHub webhook are located in US (because GitHub is triggering from US). So then it might be the other way around. That said there's a change coming up that will improve the startup time further.

@pieh
Copy link
Contributor

pieh commented Jun 24, 2019

Still pretty long, it usually was more like 40 seconds for me.

Oh, I wasn't really measuring - it might have been shorter than 2 minutes and closer to 40s - my point was it was pretty quick - much faster than setting up local env usually :)

To move this forward with this addition, I think we could split this PR into 2:

  • one that adds config + Dockerfile (and I think there is absolutely no harm in merging that part as soon as possible) - this will enable us to test all the things (including Code Review flow)
  • second one that adds docs (this will need some review to go over language etc)

@svenefftinge
Copy link
Contributor Author

@pieh I have updated this PR to only include the config. Will follow up with the documentation once it's merged.

@pieh pieh changed the title Simplify Contributions feat: add gitpod config Jun 25, 2019
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks 🙏

@pieh pieh merged commit 3cc743c into gatsbyjs:master Jun 25, 2019
@gatsbot
Copy link

gatsbot bot commented Jun 25, 2019

Holy buckets, @svenefftinge — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

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

Successfully merging this pull request may close these issues.

None yet

3 participants