From 8758af90a1263f2feab42341b592bc8aa52f887a Mon Sep 17 00:00:00 2001 From: App Platform Runtime Working Group CI Bot Date: Mon, 8 Apr 2024 16:38:33 +0000 Subject: [PATCH] Sync .github dir templates --- .github/CONTRIBUTING.md | 71 ++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/issue-bug.yml | 42 ++++++++++++++ .github/ISSUE_TEMPLATE/issue-enhance.yml | 50 +++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 61 +++++++------------- .github/TEMPLATE-README.md | 11 ++++ 6 files changed, 200 insertions(+), 40 deletions(-) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/issue-bug.yml create mode 100644 .github/ISSUE_TEMPLATE/issue-enhance.yml create mode 100644 .github/TEMPLATE-README.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..e0b71124 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,71 @@ +Contributor License Agreement +--------------- + +Follow these steps to make a contribution to any of our open source repositories: + +1. Ensure that you have completed our CLA Agreement for [individuals](https://www.cloudfoundry.org/wp-content/uploads/2015/07/CFF_Individual_CLA.pdf) or [corporations](https://www.cloudfoundry.org/wp-content/uploads/2015/07/CFF_Corporate_CLA.pdf). + +1. Set your name and email (these should match the information on your submitted CLA) + ``` + git config --global user.name "Firstname Lastname" + git config --global user.email "your_email@example.com" + ``` + +1. All contributions must be sent using GitHub pull requests as they create a nice audit trail and structured approach. + +The originating github user has to either have a github id on-file with the list of approved users that have signed +the CLA or they can be a public "member" of a GitHub organization for a group that has signed the corporate CLA. +This enables the corporations to manage their users themselves instead of having to tell us when someone joins/leaves an organization. By removing a user from an organization's GitHub account, their new contributions are no longer approved because they are no longer covered under a CLA. + +If a contribution is deemed to be covered by an existing CLA, then it is analyzed for engineering quality and product +fit before merging it. + +If a contribution is not covered by the CLA, then the automated CLA system notifies the submitter politely that we +cannot identify their CLA and ask them to sign either an individual or corporate CLA. This happens automatically as a +comment on pull requests. + +When the project receives a new CLA, it is recorded in the project records, the CLA is added to the database for the +automated system uses, then we manually make the Pull Request as having a CLA on-file. + + +Initial Setup +--------------- +- Install docker + +- Add required directories + +```bash +# create parent directory +mkdir -p ~/workspace +cd ~/workspace + +# clone ci +git clone https://github.com/cloudfoundry/wg-app-platform-runtime-ci.git + +# clone repo +git clone https://github.com/cloudfoundry/diego-release.git --recursive +cd diego-release +``` + +Running Tests +--------------- + +> [!TIP] +> Running tests for this repo requires a DB flavor. The following scripts will default to mysql DB. Set DB environment variable for alternate DBs. Valid Options: mysql-8.0(or mysql),postgres + +- `./scripts/create-docker-container.bash`: This will create a docker container with appropriate mounts. This +script can be used for interactive development with a long running container. +- `./scripts/test-in-docker.bash`: Create docker container and run all tests and setup in a single script. + - `./scripts/test-in-docker.bash `: For running tests under a specific package and/or sub-package + +When inside docker container: + +- `/repo/scripts/docker/build-binaries.bash`: (REQUIRED) This will build required binaries for running tests. +- `/repo/scripts/docker/test.bash`: This will run all tests in this repo. +- `/repo/scripts/docker/test.bash `: This will only run a package's tests +- `/repo/scripts/docker/test.bash `: This will only run sub-package tests for package +- `/repo/scripts/docker/tests-template.bash`: This will test bosh-spec templates. +- `/repo/scripts/docker/lint.bash`: This will run required linters. + +> [!IMPORTANT] +> If you are about to submit a PR, please make sure to run `./scripts/test-in-docker.bash` for MySQL and Postgres to ensure everything is tested in clean container. If you are developing, you can create create a docker container first, then the only required script to run before testing your specific component is `build-binaries.bash`. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..cc852221 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: +- name: CloudFoundry slack + url: https://cloudfoundry.slack.com + about: For help or questions about this component, you can reach the maintainers on Slack diff --git a/.github/ISSUE_TEMPLATE/issue-bug.yml b/.github/ISSUE_TEMPLATE/issue-bug.yml new file mode 100644 index 00000000..645d0e7a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-bug.yml @@ -0,0 +1,42 @@ +name: Bug +description: Report a defect, such as a bug or regression. +title: "Start the title with a verb (e.g. Change header styles). Use the imperative mood in the title (e.g. Fix, not Fixed or Fixes header styles)" +labels: + - bug +body: + - type: textarea + id: current + attributes: + label: Current behavior + validations: + required: true + - type: markdown + id: current_md + attributes: + value: | + - Explain, in detail, what the current state of the world is + - Include code snippets, log output, and analysis as necessary to explain the whole problem + - Include links to logs, GitHub issues, slack conversations, etc.. to tell us where the problem came from + - Steps to reproduce + - type: textarea + id: desired + attributes: + label: Desired behavior + validations: + required: true + - type: markdown + id: desired_md + attributes: + value: | + - Describe how the problem should be fixed + - Does this require a new bosh release? + - Does it require configuration changes in cf-deployment? + - Do we need to have a special release note? + - Do we need to update repo documentation? + - type: input + id: version + attributes: + label: Affected Version + description: Please enter the version + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/issue-enhance.yml b/.github/ISSUE_TEMPLATE/issue-enhance.yml new file mode 100644 index 00000000..7efdc8b1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-enhance.yml @@ -0,0 +1,50 @@ +name: Enhance +description: Propose an enhancement or new feature. +title: "Start the title with a verb (e.g. Change header styles). Use the imperative mood in the title (e.g. Fix, not Fixed or Fixes header styles)" +labels: + - enhancement +body: + - type: textarea + id: change + attributes: + label: Proposed Change + validations: + required: true + - type: markdown + id: change_md + attributes: + value: | + Briefly explain why this feature is necessary in the following format + + **As a** *developer/operator/whatever* + **I want** *this ability to do X* + **So that** *I can do Y* + + - Provide details of where this request is coming from including links, GitHub Issues, etc.. + - Provide details of prior work (if applicable) including links to commits, github issues, etc... + - type: textarea + id: acceptance + attributes: + label: Acceptance criteria + validations: + required: true + - type: markdown + id: acceptance_md + attributes: + value: | + Detail the exact work that is required to accept this story in the following format + + **Scenario:** *describe scenario* + **Given** *I have some sort of configuration* + **When** *I do X* + **And** *do Y* + **Then** *I see the desired behavior* + + - type: textarea + id: related + attributes: + label: Related links + description: Please list related links for this issue + placeholder: | + - [ ] code.cloudfoundry.org/bbs for links + - [x] cloudfoundry/rep#123 for issues/prs diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ecd198e3..da4d89ee 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,40 +1,21 @@ -Thank you for submitting a pull request to the bbs repository! - -We appreciate the contribution. To help us understand the context for your pull request, please fill out this template to the best of your ability. - -## Please make sure to complete all of the following steps - -1. Check the [Contributing document](https://github.com/cloudfoundry/diego-release/blob/develop/CONTRIBUTING.md) on how to sign the CLA and run tests. -1. Submit your PR to this repo. -1. [**Submit an accompanying PR Review Request**](https://github.com/cloudfoundry/diego-release/issues/new?assignees=&labels=&template=pr-review-request.md&title=%5BBBS+PR+REVIEW%5D%3A) referencing this PR so the Diego Team knows to review your pull request. -* **Note: this PR will not be reviewed unless you submit the [PR Review Request](https://github.com/cloudfoundry/diego-release/issues/new?assignees=&labels=&template=pr-review-request.md&title=%5BBS+BPR+REVIEW%5D%3A)**. - -*************************** - -## Please provide the following information: - -### What is this change about? - -> _Please describe._ - -### What problem it is trying to solve? - -> _Please describe._ - -### What is the impact if the change is not made? - -> _Please describe._ - -### How should this change be described in diego-release release notes? - -> _Something brief that conveys the change. See [previous release notes](https://github.com/cloudfoundry/diego-release/releases) for examples._ - -### Please provide any contextual information. - -> _Include any links to other PRs, stories, slack discussions, etc._ - -### Tag your pair, your PM, and/or team! - -> _It's helpful to tag someone on your team or your team alias in case we need to follow up later._ - -Thank you! +- [ ] Read the [Contributing document](../blob/-/.github/CONTRIBUTING.md). + +Summary +--------------- + + + +Backward Compatibility +--------------- +Breaking Change? **Yes/No** + diff --git a/.github/TEMPLATE-README.md b/.github/TEMPLATE-README.md new file mode 100644 index 00000000..e557ed6a --- /dev/null +++ b/.github/TEMPLATE-README.md @@ -0,0 +1,11 @@ + +> [!IMPORTANT] +> Content in this directory is managed by the CI task `sync-dot-github-dir`. + +Changing templates +--------------- +These templates are synced from [these shared templates](https://github.com/cloudfoundry/wg-app-platform-runtime-ci/tree/main/shared/github). +Each pipeline will contain a `sync-dot-github-dir-*` job for updating the content of these files. +If you would like to modify these, please change them in the shared group. +It's also possible to override the templates on pipeline's parent directory by introducing a custom +template in `$PARENT_TEMPLATE_DIR/github/FILENAME` or `$PARENT_TEMPLATE_DIR/github/REPO_NAME/FILENAME` in CI repo