Skip to content

Commit cb16c33

Browse files
author
Huy Mai
authored
Merge branch 'main' into mquhuy/deploy-cli
2 parents e5632a8 + d3376d8 commit cb16c33

File tree

109 files changed

+1410
-627
lines changed

Some content is hidden

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

109 files changed

+1410
-627
lines changed

.github/workflows/build-images-action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,13 @@ jobs:
4444
"BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}"
4545
}
4646
job_timeout: "1000"
47+
- name: Slack Notification on Failure
48+
if: ${{ failure() }}
49+
uses: rtCamp/action-slack-notify@4e5fb42d249be6a45a298f3c9543b111b02f7907 # 2.3.0
50+
env:
51+
SLACK_TITLE: 'GitHub Action Failed in ${{ github.repository }}'
52+
SLACK_COLOR: '#FF0000'
53+
SLACK_MESSAGE: 'The GitHub Action workflow failed for baremetal operator image build.'
54+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
55+
SLACK_CHANNEL: metal3-github-actions-notify
56+
SLACK_USERNAME: metal3-github-actions-notify

.github/workflows/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Check out code into the Go module directory
24-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
24+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2525
- name: Calculate go version
2626
id: vars
2727
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT

.github/workflows/e2e-fixture-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
contents: read
2727

2828
steps:
29-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
29+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
3030

3131
- name: Build BMO e2e Docker Image
3232
env:

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- apis
2121
- pkg/hardwareutils
2222
steps:
23-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
23+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2424
- name: Calculate go version
2525
id: vars
2626
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
go-version: ${{ steps.vars.outputs.go_version }}
3131
- name: golangci-lint-${{matrix.working-directory}}
32-
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
32+
uses: golangci/golangci-lint-action@9d1e0624a798bb64f6c3cea93db47765312263dc # v5.1.0
3333
with:
3434
version: v1.56.2
3535
working-directory: ${{matrix.working-directory}}

.github/workflows/kubesec.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
if: github.repository == 'metal3-io/baremetal-operator'
2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
23+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2424

2525
- name: Collect all yaml
2626
id: list_yaml
@@ -43,7 +43,7 @@ jobs:
4343
value: ${{ fromJson(needs.setup.outputs.matrix) }}
4444
steps:
4545
- name: Checkout code
46-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
46+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
4747

4848
- name: Run kubesec scanner
4949
uses: controlplaneio/kubesec-action@43d0ddff5ffee89a6bb9f29b64cd865411137b14 # v0.0.2
@@ -60,6 +60,6 @@ jobs:
6060

6161
- name: Upload Kubesec scan results to GitHub Security tab
6262
if: ${{ steps.save_result.outputs.result != '[]' }}
63-
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
63+
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
6464
with:
6565
sarif_file: ${{ matrix.value }}.sarif

.github/workflows/lint-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
contents: read
1818

1919
steps:
20-
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
20+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2121
- uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368 # v1
2222
with:
2323
use-quiet-mode: 'yes'

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Export RELEASE_TAG var
2222
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
2323
- name: checkout code
24-
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
24+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2525
with:
2626
fetch-depth: 0
2727
- name: Install go

.golangci.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,37 @@ run:
88
linters:
99
disable-all: true
1010
enable:
11+
- asasalint
1112
- asciicheck
13+
- bidichk
1214
- bodyclose
15+
#- containedctx
1316
- dogsled
14-
# - errcheck
15-
# - errorlint
17+
- dupword
18+
- durationcheck
19+
- errcheck
20+
- errchkjson
1621
- exportloopref
22+
- gci
23+
- ginkgolinter
1724
- goconst
1825
- gocritic
1926
- godot
2027
- gofmt
2128
- goimports
29+
- goprintffuncname
30+
- gosec
2231
- gosimple
2332
- govet
2433
- importas
25-
- gosec
2634
- ineffassign
35+
- loggercheck
2736
- misspell
28-
# - nakedret
29-
# - nilerr
30-
# - noctx
37+
- nakedret
38+
- nilerr
39+
- noctx
3140
- nolintlint
41+
- nosprintfhostport
3242
- prealloc
3343
- predeclared
3444
- revive
@@ -38,11 +48,12 @@ linters:
3848
- thelper
3949
- typecheck
4050
- unconvert
51+
- unparam
4152
- unused
53+
- usestdlibvars
4254
- whitespace
4355
# Run with --fast=false for more extensive checks
4456
fast: true
45-
4657
linters-settings:
4758
gosec:
4859
go: "1.21"
@@ -108,12 +119,17 @@ issues:
108119
- goconst
109120
- path: _test\.go
110121
linters:
122+
- gci
111123
- goconst
112124
- path: _test\.go
113125
linters:
114-
- unused
126+
- errcheck
127+
- gci
128+
- noctx
115129
- revive
116130
- stylecheck
131+
- unparam
132+
- unused
117133
# Specific exclude rules for deprecated fields that are still part of the codebase.
118134
# These should be removed as the referenced deprecated item is removed from the project.
119135
- linters:

PROJECT

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,13 @@ resources:
7979
kind: DataImage
8080
path: github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1
8181
version: v1alpha1
82+
- api:
83+
crdVersion: v1
84+
namespaced: true
85+
controller: true
86+
domain: metal3.io
87+
group: metal3.io
88+
kind: DataImage
89+
path: github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1
90+
version: v1alpha1
8291
version: "3"

apis/metal3.io/v1alpha1/baremetalhost_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const (
132132
OperationalStatusOK OperationalStatus = "OK"
133133

134134
// OperationalStatusDiscovered is the status value for when the
135-
// host is only partially configured, such as when when the BMC
135+
// host is only partially configured, such as when the BMC
136136
// address is known but the login credentials are not.
137137
OperationalStatusDiscovered OperationalStatus = "discovered"
138138

0 commit comments

Comments
 (0)