Skip to content

Commit 18702ca

Browse files
author
datacore-bolt-ci
committed
ci(stability): merge the release/2.7 branch
2 parents 6f1d010 + 5056598 commit 18702ca

File tree

7 files changed

+39
-14
lines changed

7 files changed

+39
-14
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ repos:
1313
- id: rust-lint
1414
name: Rust lint
1515
description: Run cargo clippy on files included in the commit.
16-
entry: nix-shell --pure --run 'cargo-clippy --all --all-targets -- -D warnings'
16+
entry: nix-shell --pure --run './scripts/rust/linter.sh clippy'
1717
pass_filenames: false
1818
types: [file, rust]
1919
language: system
2020
- id: rust-style
2121
name: Rust style
2222
description: Run cargo fmt on files included in the commit.
23-
entry: nix-shell --pure --run 'cargo-fmt --all -- --check'
23+
entry: nix-shell --pure --run './scripts/rust/linter.sh fmt'
2424
pass_filenames: false
2525
types: [file, rust]
2626
language: system

Jenkinsfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ pipeline {
113113
steps {
114114
sh 'printenv'
115115
sh 'nix-shell --run "./dependencies/control-plane/scripts/rust/generate-openapi-bindings.sh"'
116-
sh 'nix-shell --run "cargo fmt --all -- --check"'
117-
sh 'nix-shell --run "cargo clippy --all-targets -- -D warnings"'
116+
sh 'nix-shell --run "./scripts/rust/linter.sh"'
118117
sh 'nix-shell --run "./scripts/git/check-submodule-branches.sh"'
119118
}
120119
}

chart/templates/mayastor/csi/csi-node-daemonset.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ spec:
8888
args:
8989
- "--csi-socket={{ default .Values.csi.node.pluginMountPath .Values.csi.node.pluginMounthPath }}/{{ .Values.csi.node.socketPath }}"
9090
- "--node-name=$(MY_NODE_NAME)"
91-
- "--rest-endpoint=http://{{ .Release.Name }}-api-rest:8081"
91+
- "--rest-endpoint=http://{{ .Release.Name }}-api-rest:8081"{{ if .Values.csi.node.restClient.enabled }}
92+
- "--enable-rest"{{ end }}
9293
- "--enable-registration"
9394
- "--grpc-endpoint=$(MY_POD_IP):10199"{{ if .Values.csi.node.nvme.io_timeout }}
9495
- "--nvme-io-timeout={{ .Values.csi.node.nvme.io_timeout }}"

chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ csi:
386386
# Additional arguments when creating filesystems
387387
mkfs_args:
388388
xfs: ""
389+
restClient:
390+
enabled: true
389391
# -- Set tolerations, overrides global
390392
tolerations: []
391393
# -- Set PriorityClass, overrides global

scripts/helm/publish-chart-yaml.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env bash
2-
32
# On a new appTag, update the Chart.yaml which is used to publish the chart to the appropriate
43
# version and appVersion.
54
# For this first iteration version and appVersion in the Chart.yaml *MUST* point to the stable
@@ -78,9 +77,9 @@ helm_testing_branch_version() {
7877

7978
local latest_version="${release_branch#*release/}"
8079
if [[ "$latest_version" =~ ^[0-9]+$ ]]; then
81-
latest_version=${latest_version}.0.0
80+
latest_version=${latest_version}.$(semver get minor ${CHART_VERSION}).$(semver get patch ${CHART_VERSION})
8281
elif [[ "$latest_version" =~ ^[0-9]+.[0-9]+$ ]]; then
83-
latest_version=${latest_version}.0
82+
latest_version=${latest_version}.$(semver get patch ${CHART_VERSION})
8483
elif [[ "$latest_version" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then
8584
latest_version=${latest_version}
8685
else

scripts/rust/linter.sh

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

3-
cargo fmt --version
4-
cargo fmt --all
3+
set -e
54

6-
cargo clippy --version
7-
cargo clippy --all --all-targets $1 -- -D warnings
5+
FMT_ERROR=
6+
7+
OP="${1:-}"
8+
9+
case "$OP" in
10+
"" | "fmt" | "clippy")
11+
;;
12+
*)
13+
echo "linter $OP not supported"
14+
exit 2
15+
esac
16+
17+
cargo fmt -- --version
18+
cargo clippy -- --version
19+
20+
if [ -z "$OP" ] || [ "$OP" = "fmt" ]; then
21+
cargo fmt --all --check || FMT_ERROR=$?
22+
if [ -n "$FMT_ERROR" ]; then
23+
cargo fmt --all
24+
fi
25+
fi
26+
27+
if [ -z "$OP" ] || [ "$OP" = "clippy" ]; then
28+
cargo clippy --all --all-targets -- -D warnings
29+
fi
30+
31+
exit ${FMT_ERROR:-0}

0 commit comments

Comments
 (0)