diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..934984f --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,95 @@ +# Code of Conduct + +This code of conduct applies to the maintainers and contributors alike. + +## Dealing with issues and support requests + +_We wish to add a specific section on dealing with issues opened against the +repository here._ + +This repository exists in the context of the EGI Federation. While that scope +does not restrict the usage, it does inform the priority we assign to issues and +the order we deal with them. + +We welcome issues reported by the public, and more specifically the community of +people using this repository. + +The EGI team is small and cannot support all requests equally. + +While we undertake to do everything in our power to respond to issues in a +timely manner, and to prioritise issues based on reasonable requests from +submitters, the maintainers expect that the prioritisation of issues as decided +by them is respected. + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, nationality, personal appearance, race, religion, or sexual identity +and orientation. + +## Our Standards + +Examples of behaviour that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behaviour by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behaviour and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behaviour. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviours that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behaviour may be +reported by contacting the EGI Foundation team at contact@egi.eu. The team will +review and investigate all complaints, and will respond in a way that it deems +appropriate to the circumstances. The team is obligated to maintain +confidentiality with regard to the reporter of an incident. Further details of +specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..4c6a769 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,52 @@ + + +# Short Description of the issue + + + +## Environment + + + +- Operating System: +- Other related components versions: + +## Steps to reproduce + + + +## Logs, stacktrace, or other symptoms + + + +```shell +output +``` + + + +# Summary of proposed changes diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..3259778 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ + + +# Summary + + + +--- + + + +**Related issue :** diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8e85703 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +--- +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/linters/.flake8 b/.github/linters/.flake8 new file mode 100644 index 0000000..230f50a --- /dev/null +++ b/.github/linters/.flake8 @@ -0,0 +1,4 @@ +[flake8] +# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8 +extend-ignore = E203,W503 +max-line-length = 88 diff --git a/.github/linters/.markdownlint.json b/.github/linters/.markdownlint.json new file mode 100644 index 0000000..de7f46b --- /dev/null +++ b/.github/linters/.markdownlint.json @@ -0,0 +1,12 @@ +{ + "MD013": { + "line_length": 120, + "code_blocks": false, + "tables": false + }, + "MD014": false, + "MD024": false, + "MD026": { + "punctuation": ".,:;!" + } +} diff --git a/.github/linters/mlc_config.json b/.github/linters/mlc_config.json new file mode 100644 index 0000000..4e3ff5b --- /dev/null +++ b/.github/linters/mlc_config.json @@ -0,0 +1,21 @@ +{ + "httpHeaders": [ + { + "urls": ["https://docs.github.com/"], + "headers": { + "Accept-Encoding": "zstd, br, gzip, deflate" + } + } + ], + "ignorePatterns": [ + { + "pattern": "^http://localhost" + }, + { + "pattern": "^https://example.com" + }, + { + "pattern": "https://github.com/EGI-Federation/REPOSITORY/issues/new" + } + ] +} diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml new file mode 100644 index 0000000..80a2db9 --- /dev/null +++ b/.github/workflows/check-links.yml @@ -0,0 +1,30 @@ +--- +name: Check links + +on: + push: + pull_request: + +jobs: + markdown-link-check: + name: Check links using markdown-link-check + runs-on: ubuntu-latest + + steps: + # Checks out a copy of your repository on the ubuntu-latest machine + - name: Checkout code + uses: actions/checkout@v3 + with: + # Make sure the actual branch is checked out when running on PR + # ref: ${{ github.event.pull_request.head.sha }} + # Full git history needed to get proper list of changed files + fetch-depth: 0 + + - name: Check links on new changes + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + config-file: ".github/linters/mlc_config.json" + check-modified-files-only: "yes" + use-quiet-mode: "yes" + use-verbose-mode: "yes" + base-branch: "main" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..8196a73 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +--- +name: Lint + +on: + push: + pull_request: + +jobs: + super-lint: + name: Lint with Super-Linter + runs-on: ubuntu-latest + + steps: + # Checks out a copy of your repository on the ubuntu-latest machine + - name: Checkout code + uses: actions/checkout@v3 + with: + # Make sure the actual branch is checked out when running on PR + # ref: ${{ github.event.pull_request.head.sha }} + # Full git history needed to get proper list of changed files + fetch-depth: 0 + + # Runs the Super-Linter action + - name: Run Super-Linter on new changes + uses: docker://ghcr.io/github/super-linter:slim-v4 + env: + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MARKDOWN_CONFIG_FILE: .markdownlint.json + # Only check new or edited files + VALIDATE_ALL_CODEBASE: false + # Fail on errors + DISABLE_ERRORS: false diff --git a/.prettierrc.toml b/.prettierrc.toml new file mode 100644 index 0000000..cccd416 --- /dev/null +++ b/.prettierrc.toml @@ -0,0 +1,5 @@ +# Configuration for prettier +# https://prettier.io/docs/en/configuration.html +proseWrap = "always" +tabWidth = 2 +printWidth = 80 diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..66f6e93 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,9 @@ +# Authors + +## Maintainers + +Full Name + +## Contributors + +[All contributors](https://github.com/EGI-Federation//graphs/contributors) diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..f3064bf --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,12 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to +[Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [X.X.XX] +- Change description (#PR_NUMBER) (AUTHOR) diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..b1ac320 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,10 @@ +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners +# https://github.blog/2017-07-06-introducing-code-owners/ + +# Assign code owners that will automatically get asked to review Pull Requests +# The last matching pattern takes the most precedence. + +# These owners will be the default owners for everything in the repo. +# Unless a later match takes precedence, they will be requested for +# review when someone opens a pull request. +* @EGI-Federation/admins @EGI-Federation/sdis diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1f9f397 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,92 @@ +# Contributing + +Thank you for taking the time to contribute to this project. The maintainers +greatly appreciate the interest of contributors and rely on continued engagement +with the community to ensure that this project remains useful. We would like to +take steps to put contributors in the best possible position to have their +contributions accepted. Please take a few moments to read this short guide on +how to contribute; bear in mind that contributions regarding how to best +contribute are also welcome. + +## Feedback and Questions + +If you wish to discuss anything related to the project, please open a +[GitHub issue](https://github.com/EGI-Federation/REPOSITORY/issues/new). + +## Contribution Process + +Before proposing a contribution via pull request (PR), ideally there is an open +issue describing the need for your contribution (refer to this issue number when +you submit the pull request). We have a 3 steps process for contributions. + +1. Fork the project if you have not, and commit changes to a git branch +1. Create a GitHub Pull Request for your change, following the instructions in + the pull request template. +1. Perform a [Code Review](#code-review-process) with the maintainers on the + pull request. + +### Pull Request Requirements + +1. **Explain your contribution in plain language.** To assist the maintainers in + understanding and appreciating your pull request, please use the template to + explain _why_ you are making this contribution, rather than just _what_ the + contribution entails. + +### Code Review Process + +Code review takes place in GitHub pull requests. See +[this article](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) +if you're not familiar with GitHub Pull Requests. + +Once you open a pull request, maintainers will review your code using the +built-in code review process in GitHub PRs. The process at this point is as +follows: + +1. A maintainer will review your code and merge it if no changes are necessary. + Your change will be merged into the repository's `main` branch. +1. If a maintainer has feedback or questions on your changes then they will set + `request changes` in the review and provide an explanation. + +## Using git + +For collaboration purposes, it is best if you create a GitHub account and fork +the repository to your own account. Once you do this you will be able to push +your changes to your GitHub repository for others to see and use, and it will be +easier to send pull requests. + +### Branches and Commits + +You should submit your patch as a git branch named after the GitHub issue, such +as `#3`\. This is called a _topic branch_ and allows users to associate a branch +of code with the issue. + +It is a best practice to have your commit message have a _summary line_ that +includes the issue number, followed by an empty line and then a brief +description of the commit. This also helps other contributors understand the +purpose of changes to the code. + +```text + #3 - platform_family and style + + * use platform_family for platform checking + * update notifies syntax to "resource_type[resource_name]" instead of + resources() lookup + * GH-692 - delete config files dropped off by packages in conf.d + * dropped debian 4 support because all other platforms have the same + values, and it is older than "old stable" debian release +``` + +## Release cycle + +Main branch is always available. Tagged versions may be created as needed +following [Semantic Versioning](https://semver.org/) as far as applicable. + +## Community + +EGI benefits from a strong community of developers and system administrators, +and vice-versa. If you have any questions or if you would like to get involved +in the wider EGI community you can check out: + +- [EGI site](https://www.egi.eu) + +**This file has been modified from the Chef Cookbook Contributing Guide**. diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..b6b4697 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,4 @@ +This project is licensed under MIT. + +Copyrights in this project are retained by their contributors. +No copyright assignment is required to contribute to this project. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3a2ce5b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 The authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f88154c --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +# Template for EGI repositories + +This repository is to be used as a repository template for creating a new EGI +repository, and is aiming at being a clean basis promoting currently accepted +good practices. + +It includes: + +- License information +- Copyright and author information +- Code of conduct and contribution guidelines +- Templates for PR and issues +- Code owners file for automatic assignment of PR reviewers +- [GitHub actions](https://github.com/features/actions) workflows for linting + and checking links + +Content is based on: + +- [Contributor Covenant](http://contributor-covenant.org) +- [Semantic Versioning](https://semver.org/) +- [Chef Cookbook Contributing Guide](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD) + +## Asking for creation of a repository + +It can be done by contacting the +[administrators](https://github.com/orgs/EGI-Federation/teams/admins). + +The following information should be provided: + +- repository name (lower case, usually not required to mention EGI in the name) +- repository description (oneliner is enough) +- optionally additional users that should be able to manage PR and issues +- optional additional requirements (like disabling Pull Requests for the initial + repository population) + +If required a private repository can be created but public ones are the default, +but feel free to ask. + +Once all info will have been agreed the repository will be created. + +## GitHub repository management rules + +All changes should go through Pull Requests. + +### Merge management + +- Only squash should be enforced in the repository settings. +- Update commit message for the squashed commits as needed. + +### Protection on main branch + +To be configured on the repository settings. + +- Require pull request reviews before merging + - Dismiss stale pull request approvals when new commits are pushed + - Require review from Code Owners +- Require status checks to pass before merging + - GitHub actions if available + - Other checks as available and relevant + - Require branches to be up to date before merging +- Include administrators + +## Access + +All access should be managed via +[GitHub teams](https://github.com/orgs/EGI-Federation/teams). + +- EGI-Federation/admins: administration right +- Others participants depending on the requirement: maintain, triage or write or + rights