release: cut v2.0.0 release by prit342 · Pull Request #24 · controlplaneio/netassert

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: cut v2.0.0 release #24

Changes from all commits

Commits

File filter

Filter by extension

Conversations

Failed to load comments.

Loading

Jump to

Jump to file

Failed to load files.

Loading

Diff view
Diff view

8 changes: 8 additions & 0 deletions .dockerignore

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Dockerfile*
Jenkinsfile*
**/.terraform
.git/

.idea/
*.iml
.gcloudignore

16 changes: 15 additions & 1 deletion .editorconfig

Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,19 @@ insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[Makefile]
[*.py]
indent_size = 4

[{Makefile,makefile,**.mk}]
indent_style = tab

[*.sh]
indent_style = space
indent_size = 2

shell_variant = bash # like -ln=posix
binary_next_line = true # like -bn
switch_case_indent = true # like -ci
space_redirects = true # like -sr
keep_padding = false # like -kp

27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behaviour**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md

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: ''
labels: ''
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
For example: 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.

13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Question
about: Post a question about the project
title: ''
labels: question
assignees: ''
---

**Your question**
A clear and concise question.

**Additional context**
Add any other context about your question here.

25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Pull Request
about: A pull request
title: ''
labels: ''
assignees: ''
---

[pull_requests]: https://github.com/controlplaneio/kubesec/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

**All Submissions.**

- [ ] Have you followed the guidelines in our [Contributing document](../../CONTRIBUTING.md)?
- [ ] Have you checked to ensure there aren't other open [Pull Requests][pull_requests] for the same update/change?

**Code Submissions.**

- [ ] Does your submission pass linting, tests, and security analysis?

**Changes to Core Features.**

- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your core changes, as applicable?

43 changes: 43 additions & 0 deletions .github/workflows/build.yaml

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Lint and Build
on:
push:
## do not lint and build when tagged, we already do that in push to master
tags-ignore:
- '*'

branches:
- '*'
pull_request:
branches: ['main', 'master']

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Run golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
go_version: "1.20"
build:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.20.x'

- name: Install dependencies
run: go get ./...

- name: Test
run: go test -v ./... --race

- name: Build
run: go build -v ./...

28 changes: 28 additions & 0 deletions .github/workflows/release.yaml

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: goreleaser

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20.x'
- uses: anchore/sbom-action/download-syft@v0.13.3
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

131 changes: 109 additions & 22 deletions .gitignore

Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Secrets #
###########
*.pem
*.key
*_rsa

# Compiled source #
###################
*.com
Expand All @@ -6,6 +12,7 @@
*.exe
*.o
*.so
*.pyc

# Packages #
############
Expand All @@ -23,8 +30,8 @@
# Logs and databases #
######################
*.log
*.sql
*.sqlite
pip-log.txt

# OS generated files #
######################
Expand All @@ -33,34 +40,114 @@ ehthumbs.db
Icon?
Thumbs.db

# SSH #
#######################
.ssh/*.pem
.ssh/*.pub

# IDE generated files #
#######################
.idea/
*.iml
atlassian-ide-plugin.xml

# Test Files #
##############
test/log
.coverage
.tox
nosetests.xml

# Package Managed Files #
#########################
bower_components/
vendor/
composer.lock
node_modules/
.npm/
venv/
.venv/
.venv2/
.venv3/

# temporary files #
###################
*.*swp
nohup.out
*.tmp

# Virtual machines #
####################
.vagrant/

# Pythonics #
#############
*.py[cod]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
var
sdist
develop-eggs
.installed.cfg
lib
lib64

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Complexity
output/*.html
output/*/index.html

# Sphinx
docs/_build
.scratch.md

conf/.ssh/
conf/.vim/bundle/
google-cloud-sdk
conf/.tmux/plugins/*
!conf/.tmux/plugins/tpm/
conf/.tmux/resurrect/
conf/.config/keybase/

conf/.tunnelbear/pass
conf/.ivpn/pass
# Pipenv

conf/.config/fish/fish_history
conf/.config/fish/fishd.ac*
Pipfile*
# backup files
*.backup
*.notworking

conf/.docker/config.json
internal/types-not-used/
demo.yaml
.idea
cmd/netassert/cli/netassert
cmd/netassert/cli/results.tap
internal/logger/*.old
cmd/netassert/cli/cli

includes/_SECRET
# Terraform
.terraform
*.tfstate
*.tfstate.*
crash.log
crash.*.log
*.tfvars
*.tfvars.json
override.tf
override.tf.json
*_override.tf
*_override.tf.json
.terraformrc
terraform.rc
*.lock.hcl*

!bin/
.passwd-s3fs
*.orig
# Kubeconfig
*.kubeconfig

!lib/
# CLI
/cmd/netassert/cli/*.sh
abc
netassert-*-*-kubeconfig
bin
results.tap

35 changes: 35 additions & 0 deletions .goreleaser.yaml

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
builds:
- id: netassert
env:
- CGO_ENABLED=0
ldflags:
- -s
- -w
- -X main.version={{.Version}}
- -X main.gitHash={{.FullCommit}}
- -X main.buildDate={{.Date}}
goos:
- linux
- windows
- darwin
goarch:
- amd64
main: ./cmd/netassert/cli/
binary: netassert
archives:
- id: netassert
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format: tar.gz
files:
- LICENSE
wrap_in_directory: false
checksum:
algorithm: sha256
name_template: 'checksums-sha256.txt'
changelog:
sort: asc
sboms:
- id: archive
artifacts: archive
- id: source
artifacts: source

4 changes: 4 additions & 0 deletions .hadolint.yaml

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
ignored:
- DL3018 # Pin versions in apk add.
- DL3022 # COPY --from alias