From f9cfe260742e0fc188075f16d56e78738461c14c Mon Sep 17 00:00:00 2001 From: Olivier Bourgeois Date: Wed, 17 May 2023 14:16:53 -0400 Subject: [PATCH 1/3] Clarify contributing readme --- .github/CONTRIBUTING.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 46b7aa08d2..fb39c8a71f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -41,24 +41,25 @@ This project follows ## Samples requirements -All new code sample needs the following requirements: +All new code sample needs the following: - An entry in the [CODEOWNERS file](/.github/CODEOWNERS), if applicable. - A short `README.md` file with an external link pointing to the tutorial using the sample, if - applicable. Ideally, there should be only one source of truth for sample instructions. + applicable. There should only be one source of truth for sample instructions. - A GitHub Action workflow that tests the sample code. At minimum, this should dry-run any container image or Terraform configs and pass without any errors. [[Example](https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/blob/main/.github/workflows/security-ci.yml)] - - Each container image should build successfully (e.g. `docker build...`) - - Each Terraform config should validate successfully (e.g. `terraform validate...`) + - Each container image should build successfully (e.g. `docker build...`). + - Each Terraform config should validate successfully (e.g. `terraform validate...`). - If there are any other simple smoke tests that can be performed, they should also be added here. - If the sample relies on canonical image artifacts, these can be hosted officially, which requires: - Cloud Build configs for all container images that pushes to the `google-samples` artifact registry. [[Example](https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/blob/main/security/wi-secrets/cloudbuild.yaml)] - - A Terraform section for the above Cloud Build configs. + - A Terraform object for the above Cloud Build configs. [[Example](https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/blob/main/terraform/google-cloud-build-triggers.tf#L194-L207)] - Note that in order for the Cloud Build configs to be applied to the `google-samples` project, you need to run `terraform init && terraform apply` - while in that project (admin permissions required). + while in that project (a repository admin will do this for you). [[docs](/terraform/README.md)] - The images will be of the form `us-docker.pkg.dev/google-samples/containers/gke:latest` -Once the PR is merged, any changes that had been made to the Terraform scripts must be applied to the `google-samples` project. [[Instructions](/terraform/README.md)] \ No newline at end of file +If a PR modifies any existing files in the `terraform/` directory, these changes must be applied to the `google-samples` project +once the PR is merged in. A repository admin will do this for you. [[docs](/terraform/README.md)] From a87b8331de514a74a1318454c748496f3451e922 Mon Sep 17 00:00:00 2001 From: Olivier Bourgeois Date: Wed, 17 May 2023 14:17:56 -0400 Subject: [PATCH 2/3] Fix typo in readme --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index fb39c8a71f..d9084ec477 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -54,7 +54,7 @@ All new code sample needs the following: - If the sample relies on canonical image artifacts, these can be hosted officially, which requires: - Cloud Build configs for all container images that pushes to the `google-samples` artifact registry. [[Example](https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/blob/main/security/wi-secrets/cloudbuild.yaml)] - - A Terraform object for the above Cloud Build configs. + - A Terraform resource for the above Cloud Build configs. [[Example](https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/blob/main/terraform/google-cloud-build-triggers.tf#L194-L207)] - Note that in order for the Cloud Build configs to be applied to the `google-samples` project, you need to run `terraform init && terraform apply` From 343ab5ba47ec5db613da4d0eae0910575bcfc723 Mon Sep 17 00:00:00 2001 From: Olivier Bourgeois Date: Wed, 17 May 2023 17:33:58 -0400 Subject: [PATCH 3/3] Fix typo in readme --- .github/CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d9084ec477..46018dd094 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -61,5 +61,5 @@ All new code sample needs the following: while in that project (a repository admin will do this for you). [[docs](/terraform/README.md)] - The images will be of the form `us-docker.pkg.dev/google-samples/containers/gke:latest` -If a PR modifies any existing files in the `terraform/` directory, these changes must be applied to the `google-samples` project -once the PR is merged in. A repository admin will do this for you. [[docs](/terraform/README.md)] +If a pull request modifies any existing files in the `terraform/` directory, these changes must be applied to the `google-samples` project +once the pull request is merged in. A repository admin will do this for you. [[docs](/terraform/README.md)]