Skip to content

Commit 663c1ad

Browse files
committed
feat: add badges
1 parent 30698a9 commit 663c1ad

File tree

6 files changed

+259
-0
lines changed

6 files changed

+259
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Proposed changes
2+
3+
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to
4+
that issue here in this description (not in the title of the PR).
5+
6+
### Checklist
7+
8+
Before creating a PR, run through this checklist and mark each as complete.
9+
10+
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-supportpkg-for-k8s/blob/main/CONTRIBUTING.md) guide
11+
- [ ] I have proven my fix is effective or that my feature works
12+
- [ ] I have checked that all unit tests pass after adding my changes
13+
- [ ] I have ensured the README is up to date
14+
- [ ] I have rebased my branch onto main
15+
- [ ] I will ensure my PR is targeting the main branch and pulling from my branch on my own fork

.github/workflows/f5.cla.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: F5 CLA
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
pull_request_target:
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
13+
concurrency:
14+
group: ${{ github.ref_name }}-cla
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
f5-cla:
21+
name: F5 CLA
22+
runs-on: ubuntu-22.04
23+
permissions:
24+
actions: write
25+
contents: read
26+
pull-requests: write
27+
statuses: write
28+
steps:
29+
- name: Run F5 Contributor License Agreement (CLA) assistant
30+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have hereby read the F5 CLA and agree to its terms') || github.event_name == 'pull_request_target'
31+
uses: contributor-assistant/github-action@f41946747f85d28e9a738f4f38dbcc74b69c7e0e # v2.5.1
32+
with:
33+
# Any pull request targeting the following branch will trigger a CLA check.
34+
branch: "main"
35+
# Path to the CLA document.
36+
path-to-document: "https://github.com/f5/.github/blob/main/CLA/cla-markdown.md"
37+
# Custom CLA messages.
38+
custom-notsigned-prcomment: "🎉 Thank you for your contribution! It appears you have not yet signed the F5 Contributor License Agreement (CLA), which is required for your changes to be incorporated into an F5 Open Source Software (OSS) project. Please kindly read the [F5 CLA](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md) and reply on a new comment with the following text to agree:"
39+
custom-pr-sign-comment: "I have hereby read the F5 CLA and agree to its terms"
40+
custom-allsigned-prcomment: "✅ All required contributors have signed the F5 CLA for this PR. Thank you!"
41+
# Remote repository storing CLA signatures.
42+
remote-organization-name: "f5"
43+
remote-repository-name: "f5-cla-data"
44+
path-to-signatures: "signatures/beta/signatures.json"
45+
# Comma separated list of usernames for maintainers or any other individuals who should not be prompted for a CLA.
46+
allowlist: bot*
47+
# Do not lock PRs after a merge.
48+
lock-pullrequest-aftermerge: false
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
PERSONAL_ACCESS_TOKEN: ${{ secrets.F5_CLA_TOKEN }}

.github/workflows/fossa.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Fossa
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- "**.md"
9+
- "LICENSE"
10+
11+
concurrency:
12+
group: ${{ github.ref_name }}-fossa
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
scan:
20+
name: Fossa
21+
runs-on: ubuntu-22.04
22+
if: ${{ github.event.repository.fork == false }}
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
26+
27+
- name: Scan
28+
uses: fossas/fossa-action@09bcf127dc0ccb4b5a023f6f906728878e8610ba # v1.4.0
29+
with:
30+
api-key: ${{ secrets.FOSSA_TOKEN }}

.github/workflows/scorecards.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: OpenSSF Scorecards
2+
on:
3+
branch_protection_rule: # yamllint disable-line rule:empty-values
4+
schedule:
5+
- cron: "28 14 * * 2" # Run every Tuesday at 14:28 UTC
6+
push:
7+
branches:
8+
- main
9+
10+
# Declare default permissions as read only.
11+
permissions: read-all
12+
13+
jobs:
14+
analysis:
15+
name: Scorecard analysis
16+
runs-on: ubuntu-22.04
17+
permissions:
18+
# Needed to upload the results to code-scanning dashboard.
19+
security-events: write
20+
# Needed to publish results and get a badge (see publish_results below).
21+
id-token: write
22+
# Uncomment the permissions below if installing in a private repository.
23+
# contents: read
24+
# actions: read
25+
26+
steps:
27+
- name: "Checkout code"
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
29+
with:
30+
persist-credentials: false
31+
32+
- name: "Run analysis"
33+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
34+
with:
35+
results_file: results.sarif
36+
results_format: sarif
37+
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
38+
39+
# Public repositories:
40+
# - Publish results to OpenSSF REST API for easy access by consumers
41+
# - Allows the repository to include the Scorecard badge.
42+
# - See https://github.com/ossf/scorecard-action#publishing-results.
43+
# For private repositories:
44+
# - `publish_results` will always be set to `false`, regardless
45+
# of the value entered here.
46+
publish_results: true
47+
48+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
49+
# format to the repository Actions tab.
50+
- name: "Upload artifact"
51+
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
52+
with:
53+
name: SARIF file
54+
path: results.sarif
55+
retention-days: 5
56+
57+
# Upload the results to GitHub's code scanning dashboard.
58+
- name: "Upload to code-scanning"
59+
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
60+
with:
61+
sarif_file: results.sarif

CONTRIBUTING.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Contributing Guidelines
2+
3+
The following is a set of guidelines for contributing to the NGINX Supportpkg for k8s. We really appreciate that you are
4+
considering contributing!
5+
6+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
7+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
8+
## Table of Contents
9+
10+
- [Ask a Question](#ask-a-question)
11+
- [Getting Started](#getting-started)
12+
- [Contributing](#contributing)
13+
- [Report a Bug](#report-a-bug)
14+
- [Suggest an Enhancement](#suggest-an-enhancement)
15+
- [Open a Pull Request](#open-a-pull-request)
16+
- [Issue lifecycle](#issue-lifecycle)
17+
- [F5 Contributor License Agreement (CLA)](#f5-contributor-license-agreement-cla)
18+
- [Style Guides](#style-guides)
19+
- [Git Style Guide](#git-style-guide)
20+
- [Go Style Guide](#go-style-guide)
21+
22+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
23+
24+
## Ask a Question
25+
26+
To ask a question please use [Github Discussions](https://github.com/nginxinc/nginx-supportpkg-for-k8s/discussions).
27+
28+
You can also join our [Community Slack](https://community.nginx.org/joinslack) which has a wider NGINX audience.
29+
30+
Please reserve GitHub issues for feature requests and bugs rather than general questions.
31+
32+
## Getting Started
33+
34+
Read the usage and testing steps in the [README](README.md).
35+
36+
## Contributing
37+
38+
### Report a Bug
39+
40+
To report a bug, open an issue on GitHub with the label `bug` using the available bug report issue template. Please
41+
ensure the issue has not already been reported.
42+
43+
### Suggest an Enhancement
44+
45+
To suggest an enhancement, please create an issue on GitHub with the label `enhancement` using the available feature
46+
issue template.
47+
48+
### Open a Pull Request
49+
50+
- Fork the repo, create a branch, submit a PR when your changes are tested and ready for review
51+
- Fill in [our pull request template](.github/PULL_REQUEST_TEMPLATE.md)
52+
53+
> **Note**
54+
>
55+
> If you’d like to implement a new feature, please consider creating a feature request issue first to start a discussion
56+
> about the feature.
57+
58+
### Issue lifecycle
59+
60+
- When an issue or PR is created, it will be triaged by the core development team and assigned a label to indicate the
61+
type of issue it is (bug, feature request, etc) and to determine the milestone. Please see the [Issue
62+
Lifecycle](ISSUE_LIFECYCLE.md) document for more information.
63+
64+
### F5 Contributor License Agreement (CLA)
65+
66+
F5 requires all external contributors to agree to the terms of the F5 CLA (available [here](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md))
67+
before any of their changes can be incorporated into an F5 Open Source repository.
68+
69+
If you have not yet agreed to the F5 CLA terms and submit a PR to this repository, a bot will prompt you to view and
70+
agree to the F5 CLA. You will have to agree to the F5 CLA terms through a comment in the PR before any of your changes
71+
can be merged. Your agreement signature will be safely stored by F5 and no longer be required in future PRs.
72+
73+
## Style Guides
74+
75+
### Git Style Guide
76+
77+
- Keep a clean, concise and meaningful git commit history on your branch, rebasing locally and squashing before
78+
submitting a PR
79+
- Follow the guidelines of writing a good commit message as described here <https://chris.beams.io/posts/git-commit/>
80+
and summarized in the next few points
81+
- In the subject line, use the present tense ("Add feature" not "Added feature")
82+
- In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...")
83+
- Limit the subject line to 72 characters or less
84+
- Reference issues and pull requests liberally after the subject line
85+
- Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in
86+
your text editor to write a good message instead of `git commit -am`)
87+
88+
### Go Style Guide
89+
90+
- Run `gofmt` over your code to automatically resolve a lot of style issues. Most editors support this running
91+
automatically when saving a code file.
92+
- Run `go lint` and `go vet` on your code too to catch any other issues.
93+
- Follow this guide on some good practice and idioms for Go - <https://github.com/golang/go/wiki/CodeReviewComments>
94+
- To check for extra issues, install [golangci-lint](https://github.com/golangci/golangci-lint) and run `make lint` or
95+
`golangci-lint run`

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
[![OpenSSFScorecard](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-supportpkg-for-k8s/badge)](https://scorecard.dev/viewer/?uri=github.com/nginxinc/nginx-supportpkg-for-k8s)
2+
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-supportpkg-for-k8s.svg?type=shield)](https://app.fossa.com/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-supportpkg-for-k8s?ref=badge_shield)
3+
[![Go Report Card](https://goreportcard.com/badge/github.com/nginxinc/nginx-supportpkg-for-k8s)](https://goreportcard.com/report/github.com/nginxinc/nginx-supportpkg-for-k8s)
4+
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nginxinc/nginx-supportpkg-for-k8s?logo=go)
5+
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
6+
7+
18
# nginx-supportpkg-for-k8s
29

310
A kubectl plugin designed to collect diagnostics information on any NGINX product running on k8s.

0 commit comments

Comments
 (0)