From 7c5600e95501296801e32aa6f79b355ce27f2aa6 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Sun, 17 Jun 2018 16:44:26 -0700 Subject: [PATCH 1/3] Add CONTRIBUTING.md --- CONTRIBUTING.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..4bd8abe0d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing to Pulumi + +First, thanks for contributing to Pulumi and helping make it better. We appreciate the help! If you're looking for an issue to start with, we've tagged some issues with the [help-wanted](https://github.com/pulumi/pulumi/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) tag but feel free to pick up any issue that looks interesting to you or fix a bug you stumble across in the course of using Pulumi. No matter the size, we welcome all improvements. + +For larger features, we'd appreciate it if you open a [new issue](https://github.com/pulumi/pulumi/issues/new) before doing a ton of work to discuss the feature before you start writing a lot of code. + +## Hacking on Pulumi + +To hack on Pulumi, you'll need to get a development environment set up. You'll want to install the following on your machine: + +- Go 1.9 or Later +- NodeJS 6.10.X or 8.11.X (LTS releases). Others may work, but there are [known issues using Node 10](https://github.com/pulumi/pulumi/issues/1270). +- Python 2.7.X +- [dep](https://github.com/golang/dep) +- [Gometalinter](https://github.com/alecthomas/gometalinter) +- [Yarn](https://yarnpkg.com/) + +We use `make` as our build system, so you'll want to install that as well, if you don't have it already. We have extremely limited support for doing development on Windows (the bare minimum for us to get Windows validation of `pulumi`) so if you're on windows, we recommend that you use the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) if you are on Windows. We'd like to [make this better](https://github.com/pulumi/pulumi/issues/208) so feel free to pitch in if you can. + +For historical reasons (which we'd [like to address](https://github.com/pulumi/pulumi/issues/1515)) our build system requires that the folder `/opt/pulumi` exists and is writable by the current user. If you'd like, you can override this location by setting `PULUMI_ROOT` in your environment. The build is known to fail if this doesn't exist, so you'll need to create it first. + +Across our projects, we try to use a regular set of make targets. The ones you'll care most about are: + +1. `make`, which builds Pulumi and runs a quick set of tests +2. `make all` which builds Pulumi and runs the quick tests and a larger set of tests. + +We make heavy use of integration level testing where we invoke `pulumi` to create and then delete cloud resources. This requires you to have a Pulumi account (so [sign up for free](https://pulumi.com) today if you haven't already) and login with `pulumi login`. + +This repository does not actually create any real cloud resources as part of testing, but still uses Pulumi.com to store information abot some synthetic resources it creates during testing. Other repositories may require additional setup before running tests (most often this is just setting a few environment variables that tell the tests some information about how to use the cloud provider we are testing). Please see the `CONTRIBUTING.md` file in the repository, which will explain what additional configuration needs to be done before running tests. + +## Submitting a Pull Request + +For contributors we use the standard fork based workflow. Fork this repository, create a topic branch, and start hacking away. When you're ready, make sure you've run the tests (`make travis_pull_request` will run the exact flow we run in CI) and open your PR. + +## Getting Help + +We're sure there are rough edges and we appreciate you helping out. If you want to talk with other folks hacking on Pulumi (or members of the Pulumi team!) come hang out `#contribute` channel in the [Pulumi Community Slack](https://slack.pulumi.io/). From 5bd03eade8ec1249de51a6e473476d830fee6e1d Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Sun, 17 Jun 2018 16:52:32 -0700 Subject: [PATCH 2/3] Remove extra clause --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4bd8abe0d..f40b968c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ To hack on Pulumi, you'll need to get a development environment set up. You'll w - [Gometalinter](https://github.com/alecthomas/gometalinter) - [Yarn](https://yarnpkg.com/) -We use `make` as our build system, so you'll want to install that as well, if you don't have it already. We have extremely limited support for doing development on Windows (the bare minimum for us to get Windows validation of `pulumi`) so if you're on windows, we recommend that you use the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) if you are on Windows. We'd like to [make this better](https://github.com/pulumi/pulumi/issues/208) so feel free to pitch in if you can. +We use `make` as our build system, so you'll want to install that as well, if you don't have it already. We have extremely limited support for doing development on Windows (the bare minimum for us to get Windows validation of `pulumi`) so if you're on windows, we recommend that you use the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10). We'd like to [make this better](https://github.com/pulumi/pulumi/issues/208) so feel free to pitch in if you can. For historical reasons (which we'd [like to address](https://github.com/pulumi/pulumi/issues/1515)) our build system requires that the folder `/opt/pulumi` exists and is writable by the current user. If you'd like, you can override this location by setting `PULUMI_ROOT` in your environment. The build is known to fail if this doesn't exist, so you'll need to create it first. From e9266a4a07cf2c6e92fc59e34fa24efbf35b5a7f Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Sun, 17 Jun 2018 17:38:10 -0700 Subject: [PATCH 3/3] Add comment about setting GOCACHE to off when using Go 1.10 --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f40b968c2..d7e27570d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,6 +28,9 @@ We make heavy use of integration level testing where we invoke `pulumi` to creat This repository does not actually create any real cloud resources as part of testing, but still uses Pulumi.com to store information abot some synthetic resources it creates during testing. Other repositories may require additional setup before running tests (most often this is just setting a few environment variables that tell the tests some information about how to use the cloud provider we are testing). Please see the `CONTRIBUTING.md` file in the repository, which will explain what additional configuration needs to be done before running tests. +Pulumi integration tests make use of the Go test runner. When using Go 1.10 or above, we recommend setting the `GOCACHE` environment variable to `off` to avoid +erroneously caching test results. + ## Submitting a Pull Request For contributors we use the standard fork based workflow. Fork this repository, create a topic branch, and start hacking away. When you're ready, make sure you've run the tests (`make travis_pull_request` will run the exact flow we run in CI) and open your PR.