-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4,415 changed files
with
911,757 additions
and
301,986 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
# Ignore all files which are not go type | ||
!**/*.go | ||
!**/*.mod | ||
!**/*.sum |
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,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,102 @@ | ||
name: pr_check elasticobjects-operator | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'helm/**' | ||
- '.github/**' | ||
types: | ||
- opened | ||
- reopened | ||
- edited | ||
- synchronize | ||
|
||
concurrency: | ||
group: ci-tests-${{ inputs.git_repo }}-${{ github.ref }}-1 | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
submodules: recursive | ||
|
||
- name: Install latest major GO version | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' # The Go version to download | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: 'v1.55' | ||
working-directory: '.' | ||
args: --allow-parallel-runners -v --timeout 5m | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
submodules: recursive | ||
|
||
- name: Install latest major GO version | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' # The Go version to download | ||
|
||
- name: Build executables locally | ||
run: | | ||
make build | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_PASS }} | ||
|
||
- name: Dockerise | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./ | ||
builder: ${{ steps.buildx.outputs.name }} | ||
platforms: 'linux/amd64,linux/arm64' | ||
tags: kafkaobjects-operator:dev | ||
file: Dockerfile | ||
push: false | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
submodules: recursive | ||
|
||
- name: Install latest major GO version | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' # The Go version to download | ||
|
||
- name: Test locally | ||
run: | ||
make test |
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,67 @@ | ||
name: elasticobjects-operator ship action | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'operator/v*' | ||
|
||
concurrency: | ||
group: ci-ship-${{ inputs.git_repo }}-${{ github.ref }}-1 | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ship: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
submodules: recursive | ||
|
||
- uses: olegtarasov/[email protected] | ||
id: tagName | ||
with: | ||
tagRegex: 'operator/(.*)' | ||
tagRegexGroup: 1 | ||
|
||
- name: Create valid tag(s) | ||
id: tags | ||
run: | | ||
name="90poe/kafkaobjects-operator" | ||
output="$name:${{ steps.tagName.outputs.tag }},$name:latest" | ||
echo "::set-output name=all_tags::${output}" | ||
- name: Install latest major GO version | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' # The Go version to download | ||
|
||
- name: Make build for ${{ steps.tags.outputs.all_tags }} | ||
run: | ||
echo ${{ steps.tagName.outputs.tag }} > version.txt; | ||
make build | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_PASS }} | ||
|
||
- name: Dockerise | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./ | ||
builder: ${{ steps.buildx.outputs.name }} | ||
platforms: "linux/amd64,linux/arm64" | ||
tags: ${{ steps.tags.outputs.all_tags }} | ||
file: Dockerfile | ||
push: true |
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
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,69 @@ | ||
# options for analysis running | ||
run: | ||
# default concurrency is a available CPU number | ||
concurrency: 4 | ||
|
||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
deadline: 10m | ||
|
||
# all available settings of specific linters | ||
linters-settings: | ||
errcheck: | ||
# report about not checking of errors in type assetions: `a := b.(MyStruct)`; | ||
check-type-assertions: true | ||
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; | ||
check-blank: true | ||
govet: | ||
# report about shadowed variables | ||
check-shadowing: false | ||
gocyclo: | ||
# minimal code complexity to report, 30 by default (but we recommend 10-20) | ||
min-complexity: 30 | ||
lll: | ||
# max line length, lines longer will be reported. Default is 120. | ||
# '\t' is counted as 1 character by default, and can be changed with the tab-width option | ||
line-length: 2000 | ||
unused: | ||
# treat code as a program (not a library) and report unused exported identifiers | ||
check-exported: false | ||
unparam: | ||
# Inspect exported functions, default is false. Set to true if no external program/library imports your code. | ||
check-exported: true | ||
nakedret: | ||
# make an issue if func has more lines of code than this setting and it has naked returns | ||
max-func-lines: 60 | ||
prealloc: | ||
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. | ||
simple: true | ||
range-loops: true # Report preallocation suggestions on range loops | ||
for-loops: false # Report preallocation suggestions on for loops | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- govet | ||
- errcheck | ||
- gocyclo | ||
- ineffassign | ||
- typecheck | ||
- unconvert | ||
- goconst | ||
- gocyclo | ||
- staticcheck | ||
- unused | ||
- gosimple | ||
- gofmt | ||
- gosec | ||
- lll | ||
- megacheck | ||
- gocritic | ||
fast: false | ||
|
||
issues: | ||
# Independently from option `exclude` we use default exclude patterns, | ||
# it can be disabled by this option. To list all | ||
# excluded by default patterns execute `golangci-lint run --help`. | ||
# Default value for this option is true. | ||
exclude-use-default: true | ||
exclude: | ||
- "File is not `goimports`-ed" |
Oops, something went wrong.