Skip to content

Commit 6f19626

Browse files
authored
Merge branch 'main' into renovate/lock-file-maintenance
2 parents 900e9e0 + 5b03f54 commit 6f19626

File tree

127 files changed

+13640
-5054
lines changed

Some content is hidden

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

127 files changed

+13640
-5054
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Cargo.nix linguist-generated
66
yarn.lock linguist-generated
77
nix/** linguist-generated
88
go.sum linguist-generated
9+
gomod2nix.toml linguist-generated

.github/actionlint.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/workflows/pr_cockpit-web.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,39 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
17-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
17+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
1818
with:
1919
node-version: 18
2020
cache: yarn
2121
- run: yarn install --frozen-lockfile
2222
- run: yarn --cwd web run build
2323

24+
eslint:
25+
name: Run web linting via ESLint
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
29+
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
30+
with:
31+
node-version: 18
32+
cache: yarn
33+
- run: yarn install --frozen-lockfile
34+
- run: yarn --cwd web run lint
35+
2436
prettier:
2537
name: Validate web formatting
2638
runs-on: ubuntu-latest
2739
steps:
2840
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
29-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
41+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
3042
with:
3143
node-version: 18
3244
cache: yarn
3345
- run: yarn install --frozen-lockfile
3446
- run: yarn --cwd web run format --check
3547
- name: Git Diff showed uncommitted changes
3648
if: ${{ failure() }}
37-
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6
49+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
3850
with:
3951
script: |
40-
core.setFailed('web/ contains unformatted code, run `pnpm prettier . --write` and re-commit!')
52+
core.setFailed('web/ contains unformatted code, run `yarn --cwd web run format --write` and re-commit!')

.github/workflows/pr_cockpit.yml

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
- "go.sum"
1616

1717
env:
18-
RUST_VERSION: 1.75.0
19-
GO_VERSION: '^1.22.2'
18+
RUST_VERSION: 1.85.0
19+
GO_VERSION: '^1.22.5'
2020
CARGO_TERM_COLOR: always
2121
CARGO_INCREMENTAL: "0"
2222
CARGO_PROFILE_DEV_DEBUG: "0"
@@ -30,16 +30,11 @@ jobs:
3030
name: General Pull Request Checks
3131
uses: ./.github/workflows/pr_general.yml
3232

33-
reviewdog-checks:
34-
name: Reviewdog Pull Request Checks
35-
uses: ./.github/workflows/pr_reviewdog.yml
36-
3733
check-charts:
3834
name: Helm Chart Check
3935
runs-on: ubuntu-latest
4036
needs:
4137
- general-checks
42-
- reviewdog-checks
4338
steps:
4439
- name: Checkout Repository
4540
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
@@ -57,7 +52,7 @@ jobs:
5752
toolchain: ${{ env.RUST_VERSION }}
5853

5954
- name: Setup Rust Cache
60-
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
55+
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
6156
with:
6257
key: pr-stackable-cockpit-chart
6358

@@ -69,16 +64,27 @@ jobs:
6964

7065
- name: Helm Charts not up-to-date
7166
if: ${{ failure() }}
72-
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6
67+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
7368
with:
7469
script: |
7570
core.setFailed('Committed Helm charts were not up to date, please regenerate and re-commit!')
7671
7772
publish:
78-
name: Publish Docker Image
79-
runs-on: ubuntu-latest
73+
name: Publish ${{ matrix.runner.arch }} Image
74+
permissions:
75+
id-token: write
76+
runs-on: ${{ matrix.runner.name }}
77+
strategy:
78+
matrix:
79+
runner:
80+
- {name: "ubuntu-latest", arch: "amd64"}
81+
- {name: "ubicloud-standard-8-arm", arch: "arm64"}
8082
env:
8183
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
84+
OCI_REGISTRY_SDP_PASSWORD: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
85+
OCI_REGISTRY_SDP_USERNAME: "robot$sdp+github-action-build"
86+
OCI_REGISTRY_SDP_CHARTS_PASSWORD: ${{ secrets.HARBOR_ROBOT_SDP_CHARTS_GITHUB_ACTION_BUILD_SECRET }}
87+
OCI_REGISTRY_SDP_CHARTS_USERNAME: "robot$sdp-charts+github-action-build"
8288
outputs:
8389
IMAGE_TAG: ${{ steps.printtag.outputs.IMAGE_TAG }}
8490
needs:
@@ -95,12 +101,18 @@ jobs:
95101
with:
96102
toolchain: ${{ env.RUST_VERSION }}
97103

98-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
104+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
99105
with:
100106
go-version: ${{ env.GO_VERSION }}
101107

108+
- name: Install cosign
109+
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
110+
111+
- name: Install syft
112+
uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2
113+
102114
- name: Setup Rust Cache
103-
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
115+
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
104116
with:
105117
key: pr-stackable-cockpit-chart
106118

@@ -121,3 +133,40 @@ jobs:
121133
if: ${{ !github.event.pull_request.head.repo.fork }}
122134
name: Output Image Name and Tag
123135
run: echo "IMAGE_TAG=$(make -e print-docker-tag)" >> "$GITHUB_OUTPUT"
136+
137+
create_manifest_list:
138+
name: Build and publish manifest list
139+
needs:
140+
- publish
141+
runs-on: ubuntu-latest
142+
permissions:
143+
id-token: write
144+
env:
145+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
146+
OCI_REGISTRY_SDP_PASSWORD: ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
147+
OCI_REGISTRY_SDP_USERNAME: "robot$sdp+github-action-build"
148+
OCI_REGISTRY_SDP_CHARTS_PASSWORD: ${{ secrets.HARBOR_ROBOT_SDP_CHARTS_GITHUB_ACTION_BUILD_SECRET }}
149+
OCI_REGISTRY_SDP_CHARTS_USERNAME: "robot$sdp-charts+github-action-build"
150+
steps:
151+
- name: Install cosign
152+
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
153+
- name: Checkout
154+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
155+
with:
156+
submodules: recursive
157+
# This step checks if the current run was triggered by a push to a pr (or a pr being created).
158+
# If this is the case it changes the version of this project in all Cargo.toml files to include the suffix
159+
# "-pr<prnumber>" so that the published artifacts can be linked to this PR.
160+
- uses: stackabletech/cargo-install-action@main
161+
with:
162+
crate: cargo-edit
163+
bin: cargo-set-version
164+
- name: Update version if PR
165+
if: ${{ github.event_name == 'pull_request' }}
166+
run: cargo set-version --offline --package stackable-cockpit 0.0.0-pr${{ github.event.pull_request.number }}
167+
- name: Build manifest list
168+
run: |
169+
# Creating manifest list
170+
make -e docker-manifest-list-build
171+
# Pushing and signing manifest list
172+
make -e docker-manifest-list-publish

.github/workflows/pr_docs.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,3 @@ jobs:
1111
general-checks:
1212
name: General Pull Request Checks
1313
uses: ./.github/workflows/pr_general.yml
14-
15-
reviewdog-checks:
16-
name: Reviewdog Pull Request Checks
17-
uses: ./.github/workflows/pr_reviewdog.yml

.github/workflows/pr_general.yml

Lines changed: 12 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Pull Request General
44
on: workflow_call
55

66
env:
7-
RUST_VERSION: 1.75.0
8-
GO_VERSION: '^1.22.2'
7+
RUST_VERSION: 1.85.0
8+
GO_VERSION: '^1.22.5'
99
CARGO_TERM_COLOR: always
1010
CARGO_INCREMENTAL: "0"
1111
CARGO_PROFILE_DEV_DEBUG: "0"
@@ -28,11 +28,11 @@ jobs:
2828
with:
2929
toolchain: ${{ env.RUST_VERSION }}
3030

31-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
31+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
3232
with:
3333
go-version: ${{ env.GO_VERSION }}
3434

35-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
35+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
3636
with:
3737
node-version: 18
3838
cache: yarn
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
key: udeps
4444
cache-all-crates: "true"
45-
- run: cargo install --locked cargo-udeps@0.1.39
45+
- run: cargo install --locked cargo-udeps@0.1.55
4646
- run: cargo udeps --workspace
4747

4848
run_cargodeny:
@@ -59,66 +59,10 @@ jobs:
5959
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
6060
with:
6161
submodules: recursive
62-
- uses: EmbarkStudios/cargo-deny-action@a50c7d5f86370e02fae8472c398f15a36e517bb8 # v1.5.4
62+
- uses: EmbarkStudios/cargo-deny-action@3f4a782664881cf5725d0ffd23969fcce89fd868 # v1.6.3
6363
with:
6464
command: check ${{ matrix.checks }}
6565

66-
run_rustfmt:
67-
name: Run Rustfmt
68-
runs-on: ubuntu-latest
69-
steps:
70-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
71-
with:
72-
submodules: recursive
73-
- uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e # v1
74-
with:
75-
toolchain: ${{ env.RUST_VERSION }}
76-
components: rustfmt
77-
- run: cargo fmt --all -- --check
78-
79-
run_clippy:
80-
name: Run Clippy
81-
runs-on: ubuntu-latest
82-
steps:
83-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
84-
with:
85-
submodules: recursive
86-
87-
- uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e # v1
88-
with:
89-
toolchain: ${{ env.RUST_VERSION }}
90-
components: clippy
91-
92-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
93-
with:
94-
go-version: ${{ env.GO_VERSION }}
95-
96-
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
97-
with:
98-
key: clippy
99-
100-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
101-
with:
102-
node-version: 18
103-
cache: yarn
104-
105-
- run: yarn install --frozen-lockfile
106-
- name: Run clippy action to produce annotations
107-
env:
108-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109-
uses: giraffate/clippy-action@871cc4173f2594435c7ea6b0bce499cf6c2164a1
110-
if: env.GITHUB_TOKEN != null
111-
with:
112-
clippy_flags: --all-targets -- -D warnings
113-
github_token: ${{ secrets.GITHUB_TOKEN }}
114-
reporter: "github-pr-check"
115-
116-
- name: Run clippy manually without annotations
117-
env:
118-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119-
if: env.GITHUB_TOKEN == null
120-
run: cargo clippy --all-targets -- -D warnings
121-
12266
run_rustdoc:
12367
name: Run RustDoc
12468
runs-on: ubuntu-latest
@@ -132,15 +76,15 @@ jobs:
13276
toolchain: ${{ env.RUST_VERSION }}
13377
components: rustfmt
13478

135-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
79+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
13680
with:
13781
go-version: ${{ env.GO_VERSION }}
13882

139-
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
83+
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
14084
with:
14185
key: doc
14286

143-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
87+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
14488
with:
14589
node-version: 18
14690
cache: yarn
@@ -159,15 +103,15 @@ jobs:
159103
with:
160104
toolchain: ${{ env.RUST_VERSION }}
161105

162-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
106+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
163107
with:
164108
go-version: ${{ env.GO_VERSION }}
165109

166-
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
110+
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
167111
with:
168112
key: test
169113

170-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
114+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
171115
with:
172116
node-version: 18
173117
cache: yarn
@@ -179,8 +123,6 @@ jobs:
179123
needs:
180124
- run_udeps
181125
- run_cargodeny
182-
- run_clippy
183-
- run_rustfmt
184126
- run_rustdoc
185127
- run_tests
186128
runs-on: ubuntu-latest
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: pre-commit
3+
4+
on:
5+
pull_request:
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
RUST_TOOLCHAIN_VERSION: "nightly-2025-01-15"
10+
HADOLINT_VERSION: "v1.17.6"
11+
NIX_VERSION: "2.25.2"
12+
13+
jobs:
14+
pre-commit:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
21+
with:
22+
node-version: 18
23+
cache: yarn
24+
- run: yarn install --frozen-lockfile
25+
- uses: stackabletech/actions/run-pre-commit@5901c3b1455488820c4be367531e07c3c3e82538 # v0.4.0
26+
with:
27+
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
28+
hadolint: ${{ env.HADOLINT_VERSION }}
29+
nix: ${{ env.NIX_VERSION }}
30+
nix-github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)