diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 000000000..a935fc890 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,73 @@ +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/garden-runc-release.git --recursive +cd garden-runc-release +``` + +- Concourse and fly cli + +Running Tests +--------------- + +> [!IMPORTANT] +> The following scripts is ran against a Concourse worker. Set `FLY_TARGET` (Defaults to `shared`) environment variable to target your installation instead + +- `./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. Not all tests pass in docker and that's why we recommend running tests in Concourse before submitting a PR. +- `./scripts/test-in-docker.bash`: Create docker container and run linters and template tests in a single script. +- `./scripts/test-in-concourse.bash `: Create concourse on-off job and test all components or a single package. Optional `CLEAN_CACHE=yes` environment variable is recommended to be set when submitting a PR to make sure cache is cleared. + +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 `CLEAN_CACHE=yes ./scripts/test-in-concourse.bash` to ensure everything is tested with a rebuild of required binaries. 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`. Most tests for this release pass in docker . diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index b9ed7e267..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,55 +0,0 @@ - - -## Description - - -## Environment - -* garden-runc-release version: -* Enabled configuration: -* IaaS: -* Stemcell version: -* Kernel version: - -## Steps to reproduce - - -## Logs - - -## Docker image (if relevant) - - -## Cause - - -## Resolution - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..cc8522210 --- /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 000000000..645d0e7a8 --- /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 000000000..7efdc8b17 --- /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 new file mode 100644 index 000000000..da4d89ee9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ +- [ ] 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 000000000..e557ed6a0 --- /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 diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 9eb4128b9..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "gitsubmodule" - directory: "/" - schedule: - interval: "weekly" - target-branch: "develop" - labels: - - "dependencies"