Skip to content

Commit a7c2f50

Browse files
committed
repo: initial commit
Signed-off-by: Jose A. Rivera <[email protected]>
0 parents  commit a7c2f50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2174
-0
lines changed

Diff for: .dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2+
# Ignore build and test binaries.
3+
bin/
4+
testbin/

Diff for: .github/workflows/codespell.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: codespell
3+
4+
on:
5+
push:
6+
branches: ['*']
7+
pull_request:
8+
branches: ['*']
9+
10+
jobs:
11+
codespell:
12+
name: codespell
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: codespell
18+
uses: codespell-project/actions-codespell@master
19+
with:
20+
exclude_file: go.sum
21+
check_filenames: true
22+
check_hidden: true
23+
skip: vendor

Diff for: .github/workflows/commitlint.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: commitlint
3+
4+
on:
5+
push:
6+
branches: ['*']
7+
pull_request:
8+
branches: ['*']
9+
10+
jobs:
11+
commitlint:
12+
name: commitlint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- name: run commitlint
20+
uses: wagoid/commitlint-github-action@v4
21+
with:
22+
configFile: './.github/workflows/conf/commitlintrc.json'
23+
helpURL: |
24+
Some helpful links
25+
Contribution Guide -> https://github.com/red-hat-storage/odf-operator/blob/main/CONTRIBUTING.md#commit-structure
26+
Naming Conventions -> https://commitlint.js.org/#/concepts-commit-conventions
27+
Rules -> https://commitlint.js.org/#/reference-rules
28+
How to Write a Good Git Commit Message -> https://chris.beams.io/posts/git-commit

Diff for: .github/workflows/conf/commitlintrc.json

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"extends": [
3+
"@commitlint/config-conventional"
4+
],
5+
"rules": {
6+
"body-case": [
7+
0,
8+
"always",
9+
"lower-case"
10+
],
11+
"body-empty": [
12+
1,
13+
"never"
14+
],
15+
"body-leading-blank": [
16+
2,
17+
"always"
18+
],
19+
"body-max-line-length": [
20+
1,
21+
"always",
22+
72
23+
],
24+
"footer-leading-blank": [
25+
2,
26+
"always"
27+
],
28+
"header-case": [
29+
0,
30+
"always",
31+
"lower-case"
32+
],
33+
"header-full-stop": [
34+
2,
35+
"never",
36+
"."
37+
],
38+
"header-max-length": [
39+
2,
40+
"always",
41+
72
42+
],
43+
"signed-off-by": [
44+
2,
45+
"always",
46+
"Signed-off-by:"
47+
],
48+
"subject-case": [
49+
0,
50+
"always",
51+
"lower-case"
52+
],
53+
"subject-empty": [
54+
2,
55+
"never"
56+
],
57+
"type-case": [
58+
0,
59+
"always",
60+
"lower-case"
61+
],
62+
"type-empty": [
63+
2,
64+
"never"
65+
],
66+
"type-enum": [
67+
2,
68+
"always",
69+
[
70+
"action",
71+
"api",
72+
"bundle",
73+
"ci",
74+
"console",
75+
"controllers",
76+
"docs",
77+
"godeps",
78+
"hack",
79+
"makefile",
80+
"metrics",
81+
"repo",
82+
"test",
83+
"vendor",
84+
"webhook"
85+
]
86+
]
87+
}
88+
}

Diff for: .github/workflows/conf/yamllint.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
extends: default
3+
yaml-files:
4+
- '*.yaml'
5+
- '*.yml'
6+
- '.yamllint'
7+
ignore: |
8+
vendor
9+
rules:
10+
braces: enable
11+
brackets: enable
12+
colons: enable
13+
commas: enable
14+
comments: disable
15+
comments-indentation:
16+
level: warning
17+
document-end: disable
18+
document-start: disable
19+
empty-lines:
20+
max-start: 1
21+
empty-values: disable
22+
hyphens: enable
23+
indentation: disable
24+
key-duplicates: enable
25+
key-ordering: disable
26+
line-length: disable
27+
new-line-at-end-of-file: enable
28+
new-lines: enable
29+
octal-values: disable
30+
quoted-strings: disable
31+
trailing-spaces: enable
32+
truthy:
33+
level: warning
34+
allowed-values: ['true', 'false', 'on']

Diff for: .github/workflows/dependencies.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: github
3+
4+
on:
5+
pull_request_target:
6+
types:
7+
- opened
8+
- edited
9+
- reopened
10+
- synchronize
11+
12+
jobs:
13+
dependencies:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: z0al/dependent-issues@v1
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/docker-build.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
name: image-builder
3+
4+
on:
5+
push:
6+
branches: ['*']
7+
pull_request:
8+
branches: ['*']
9+
10+
jobs:
11+
container-build:
12+
name: operator-build
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
go: ["1.17", "1.18"]
18+
steps:
19+
- uses: actions/setup-go@v2
20+
with:
21+
go-version: ${{ matrix.go }}
22+
23+
- uses: actions/checkout@v2
24+
25+
- name: Build operator container image
26+
run: make build
27+
28+
bundle-build:
29+
name: bundle-build
30+
runs-on: ubuntu-latest
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
go: ["1.17", "1.18"]
35+
steps:
36+
- uses: actions/setup-go@v2
37+
with:
38+
go-version: ${{ matrix.go }}
39+
40+
- uses: actions/checkout@v2
41+
42+
- name: Build operator bundle container image
43+
run: make bundle-build
44+
45+
catalog-build:
46+
name: catalog-build
47+
runs-on: ubuntu-latest
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
go: ["1.17", "1.18"]
52+
steps:
53+
- uses: actions/setup-go@v2
54+
with:
55+
go-version: ${{ matrix.go }}
56+
57+
- uses: actions/checkout@v2
58+
59+
- name: Build catalog container image
60+
env:
61+
IMAGE_REGISTRY: localhost:5000
62+
run: |
63+
docker run -d -p 5000:5000 --name registry registry:2
64+
make bundle-build bundle-push catalog-build

Diff for: .github/workflows/docker-push.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: image-publisher
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
REGISTRY_NAMESPACE:
7+
required: true
8+
default: ocs-dev
9+
IMAGE_TAG:
10+
required: true
11+
default: latest
12+
13+
jobs:
14+
docker-push:
15+
name: docker-push
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/setup-go@v2
19+
with:
20+
go-version: '1.17'
21+
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Login to Quay
27+
uses: docker/login-action@v1
28+
with:
29+
registry: quay.io
30+
username: ${{ secrets.QUAY_USERNAME }}
31+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
32+
33+
- name: Build and push docker images
34+
env:
35+
REGISTRY_NAMESPACE: ${{ github.event.inputs.REGISTRY_NAMESPACE }}
36+
IMAGE_TAG: ${{ github.event.inputs.IMAGE_TAG }}
37+
run: |
38+
make docker-build docker-push
39+
make bundle-build bundle-push
40+
make catalog-build catalog-push

Diff for: .github/workflows/golangci-lint.yaml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: golangci-lint
3+
4+
on:
5+
push:
6+
branches: ['*']
7+
pull_request:
8+
branches: ['*']
9+
10+
jobs:
11+
golangci-lint:
12+
name: golangci-lint
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
go: ["1.17", "1.18"]
18+
steps:
19+
- uses: actions/setup-go@v2
20+
with:
21+
go-version: ${{ matrix.go }}
22+
23+
- uses: actions/checkout@v2
24+
25+
- name: golangci-lint
26+
uses: golangci/golangci-lint-action@v2
27+
with:
28+
# Optional: version of golangci-lint to use in form of v1.2 or
29+
# v1.2.3 or `latest` to use the latest version
30+
version: latest
31+
32+
# Optional: working directory, useful for monorepos
33+
# working-directory: somedir
34+
35+
# Optional: golangci-lint command line arguments.
36+
# TODO: --out-format=github-action is enforced but doesn't print
37+
# file names or line numbers. Watch for fix in Issue:
38+
# https://github.com/golangci/golangci-lint-action/issues/119
39+
#
40+
# The weird NO_FUTURE thing is a workaround suggested here:
41+
# https://github.com/golangci/golangci-lint-action/issues/119#issuecomment-981090648
42+
args: "--out-${NO_FUTURE}format=colored-line-number"
43+
44+
# Optional: show only new issues if it's a pull request.
45+
# The default value is `false`.
46+
# only-new-issues: true
47+
48+
# Optional: if set to true then the action will use pre-installed Go.
49+
skip-go-installation: true
50+
51+
# Optional: if set to true then the action don't cache or
52+
# restore ~/go/pkg.
53+
# skip-pkg-cache: true
54+
55+
# Optional: if set to true then the action don't cache or
56+
# restore ~/.cache/go-build.
57+
# skip-build-cache: true

Diff for: .github/workflows/yamllint.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: yamllint
3+
on:
4+
push:
5+
branches: ['*']
6+
pull_request:
7+
branches: ['*']
8+
jobs:
9+
yamllint:
10+
name: yamllint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: yamllint
15+
uses: ibiqlik/action-yamllint@v3
16+
with:
17+
config_file: ./.github/workflows/conf/yamllint.yaml
18+
file_or_dir: . # Recursive on all yaml files

0 commit comments

Comments
 (0)