-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Raul Sevilla <[email protected]>
- Loading branch information
1 parent
c9de764
commit 0b80026
Showing
71 changed files
with
2,449 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG]" | ||
labels: bug | ||
assignees: '' | ||
--- | ||
|
||
# Bug Description | ||
|
||
## **Output of `kube-burner` version** | ||
|
||
## **Describe the bug** | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
## **To Reproduce** | ||
|
||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
1. Click on '....' | ||
1. Scroll down to '....' | ||
1. See error | ||
|
||
## **Expected behavior** | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
## **Screenshots or output** | ||
|
||
If applicable, add screenshots or kube-burner output to help explain your problem. | ||
|
||
## **Additional context** | ||
|
||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '[RFE]' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## Type of change | ||
|
||
- [ ] Refactor | ||
- [ ] New feature | ||
- [ ] Bug fix | ||
- [ ] Optimization | ||
- [ ] Documentation Update | ||
|
||
## Description | ||
|
||
<!--- Describe your changes in detail --> | ||
|
||
## Related Tickets & Documents | ||
|
||
- Related Issue # | ||
- Closes # | ||
|
||
## Checklist before requesting a review | ||
|
||
- [ ] I have performed a self-review of my code. | ||
- [ ] If it is a core feature, I have added thorough tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build kube-burner-ocp | ||
on: | ||
workflow_call: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
persist-credentials: false | ||
|
||
- name: Set up Go 1.19 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Build code | ||
run: make build | ||
|
||
- name: Install mkdocs dependencies | ||
run: pip install mkdocs-material mkdocs-include-markdown-plugin mike | ||
|
||
- name: Build documentation | ||
run: mkdocs build | ||
|
||
- name: Install | ||
run: sudo make install | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: kube-burner-ocp | ||
path: /usr/bin/kube-burner-ocp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: CI tests | ||
on: | ||
workflow_call: | ||
pull_request_target: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
lint: | ||
uses: ./.github/workflows/linters.yml | ||
|
||
build: | ||
uses: ./.github/workflows/builders.yml | ||
|
||
tests: | ||
needs: build | ||
uses: ./.github/workflows/test-ocp.yml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy docs | ||
on: | ||
workflow_call: | ||
jobs: | ||
deploy-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Setup doc deploy | ||
run: | | ||
git config --global user.name Docs deploy | ||
git config --global user.email [email protected] | ||
- name: Install dependencies | ||
run: pip install mkdocs-material mkdocs-include-markdown-plugin mike | ||
|
||
- name: Deploy docs | ||
run: mike deploy --push -m "Update docs to version ${{ github.ref_name }}" --update-aliases ${{ github.ref_name }} latest | ||
|
||
- name: Delete docs for older tags | ||
run: | | ||
echo "Keeping documentation for latest tags" | ||
all_tags=$(git tag --sort=-v:refname) | ||
tags_to_keep=$(echo "$all_tags" | head -n 3) | ||
for tag in $all_tags; do | ||
if [[ $tags_to_keep != *"$tag"* ]]; then | ||
if mike list | grep -q "$tag"; then | ||
echo "Deleting documentation for tag: $tag" | ||
mike delete "$tag" | ||
else | ||
echo "Documentation for tag $tag not found. Skipping deletion." | ||
fi | ||
fi | ||
done | ||
- name: Set latest as default doc branch | ||
run: mike set-default --push latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# gorelease.yml | ||
name: Create a new release of project | ||
on: | ||
workflow_call: | ||
jobs: | ||
release-go: | ||
name: GoReleaser build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ | ||
persist-credentials: false | ||
|
||
- name: Set up Go 1.19 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@master | ||
with: | ||
version: 1.19.0 | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Linters | ||
on: | ||
workflow_call: | ||
jobs: | ||
linters: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
persist-credentials: false | ||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Run pre-commit hooks | ||
run: pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Release Workflow | ||
on: | ||
push: | ||
tags: | ||
- "*" # triggers only if push new tag version | ||
jobs: | ||
ci-tests: | ||
uses: ./.github/workflows/ci-tests.yml | ||
secrets: inherit | ||
|
||
release-build: | ||
uses: ./.github/workflows/gorelease.yml | ||
needs: ci-tests | ||
|
||
deploy-docs: | ||
uses: ./.github/workflows/docs.yml | ||
needs: ci-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: "0 12 * * *" | ||
|
||
jobs: | ||
stale: | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/stale@v8 | ||
with: | ||
stale-issue-message: 'This issue has become stale and will be closed automatically within 7 days.' | ||
stale-pr-message: 'This pull request has become stale and will be closed automatically within 7 days.' | ||
stale-issue-label: 'stale' | ||
stale-pr-label: 'stale' | ||
days-before-stale: 90 | ||
days-before-close: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Execute tests on OCP | ||
on: | ||
workflow_call: | ||
secrets: | ||
OPENSHIFT_SERVER: | ||
required: true | ||
OPENSHIFT_USER: | ||
required: true | ||
OPENSHIFT_PASSWORD: | ||
required: true | ||
jobs: | ||
ocp-e2e-ci: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ocp-e2e-ci | ||
steps: | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
persist-credentials: false | ||
|
||
- name: Download kube-burner-ocp binary | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: kube-burner-ocp | ||
path: /tmp/ | ||
|
||
- name: Install bats | ||
uses: mig4/setup-bats@v1 | ||
with: | ||
bats-version: 1.9.0 | ||
|
||
- name: Install oc | ||
uses: redhat-actions/oc-installer@v1 | ||
|
||
- name: Authenticate against OCP cluster | ||
run: oc login -u ${OPENSHIFT_USER} -p ${OPENSHIFT_PASSWORD} ${OPENSHIFT_SERVER} --insecure-skip-tls-verify=true | ||
env: | ||
OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }} | ||
OPENSHIFT_USER: ${{ secrets.OPENSHIFT_USER }} | ||
OPENSHIFT_PASSWORD: ${{ secrets.OPENSHIFT_PASSWORD }} | ||
|
||
- name: Execute Tests | ||
run: | | ||
export PATH=${PATH}:/tmp/ | ||
chmod +x /tmp/kube-burner-ocp | ||
make test-ocp | ||
env: | ||
TERM: linux | ||
OPENSHIFT_SERVER: ${{ secrets.OPENSHIFT_SERVER }} | ||
OPENSHIFT_USER: ${{ secrets.OPENSHIFT_USER }} | ||
OPENSHIFT_PASSWORD: ${{ secrets.OPENSHIFT_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
*.test | ||
*.out | ||
bin | ||
dist | ||
site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
run: | ||
timeout: 5m | ||
linters-settings: | ||
misspell: | ||
locale: US | ||
linters: | ||
disable-all: true | ||
enable: | ||
- nakedret | ||
- unused | ||
- misspell | ||
- ineffassign | ||
- goconst | ||
- goimports | ||
- dupl | ||
- unparam | ||
- revive | ||
- staticcheck | ||
- gosimple | ||
- unconvert | ||
- gocyclo | ||
- gofmt | ||
- govet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
repos: | ||
- repo: https://github.com/golangci/golangci-lint | ||
rev: v1.51.2 | ||
hooks: | ||
- id: golangci-lint | ||
args: [--timeout=5m] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.34.0 | ||
hooks: | ||
- id: markdownlint | ||
args: [--disable, MD013, MD002] | ||
- repo: https://github.com/jumanjihouse/pre-commit-hooks | ||
rev: 3.0.0 | ||
hooks: | ||
- id: shellcheck | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-json |
Oops, something went wrong.