summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com>2024-03-29 14:05:56 +0200
committerGitHub <noreply@github.com>2024-03-29 08:05:56 -0400
commit90b2860fcdb0d0ec0a2f9ea59725299323e7a948 (patch)
tree6c7cb029fa2f5d3d5f29b3e335ffa029bfd00121
parent1cc14e2f3d4c335065525cf1202987ff351f8ab0 (diff)
Fix action lints (#17120)
* Clang output should be disabled Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * Commend out Clang Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * Fix quoting and snooze sc2043 Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * Fix failure messages garbages/steps Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * Fix failure messages step, cleanup garbages Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * Add quoting whever is necessary and group the echo commands Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * Fix parorama Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * apply code review Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * micnor fix Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * more fixes Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> --------- Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
-rw-r--r--.github/workflows/build.yml3
-rw-r--r--.github/workflows/cloud_regression.yml15
-rw-r--r--.github/workflows/docker.yml6
-rw-r--r--.github/workflows/generate-integrations.yml4
-rw-r--r--.github/workflows/monitor-releases.yml2
-rw-r--r--.github/workflows/repoconfig-packages.yml13
-rw-r--r--.github/workflows/review.yml72
7 files changed, 58 insertions, 57 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a5bad1859c..4623e15daf 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -634,10 +634,9 @@ jobs:
SLACK_USERNAME: 'GitHub Actions'
SLACK_MESSAGE: |-
${{ github.repository }}: Failed to prepare release artifacts for upload.
- CHeckout: ${{ steps.checkout.outcome }}
+ Checkout: ${{ steps.checkout.outcome }}
Prepare environment: ${{ steps.prepare.outcome }}
Fetch dist tarball: ${{ steps.fetch-dist.outcome }}
- Fetch static builds: ${{ steps.fetch-static.outcome }}
Consolidate artifacts: ${{ steps.consolidate.outcome }}
Store: ${{ steps.store.outcome }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
diff --git a/.github/workflows/cloud_regression.yml b/.github/workflows/cloud_regression.yml
index 01fcdca4db..67a55ed2a7 100644
--- a/.github/workflows/cloud_regression.yml
+++ b/.github/workflows/cloud_regression.yml
@@ -22,21 +22,24 @@ jobs:
PR_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
id: output-workflow-dispatch-params
run: |
- if [ ${{ github.event_name }} == 'pull_request_target' ]; then
+ if [ "${{ github.event_name }}" == 'pull_request_target' ]; then
NETDATA_CUSTOM_REPO="$PR_REPO_NAME"
NETDATA_CUSTOM_BRANCH="$PR_BRANCH_NAME"
NETDATA_CUSTOM_PR_NUMBER="${{ github.event.number }}"
NETDATA_CUSTOM_COMMIT_HASH="$PR_COMMIT_HASH"
- elif [ ${{ github.event_name }} == 'push' ]; then
+ elif [ "${{ github.event_name }}" == 'push' ]; then
NETDATA_CUSTOM_REPO="netdata/netdata"
NETDATA_CUSTOM_BRANCH="master"
NETDATA_CUSTOM_PR_NUMBER=""
NETDATA_CUSTOM_COMMIT_HASH="${{ github.sha }}"
fi
- echo "netdata_repo=${NETDATA_CUSTOM_REPO}" >> $GITHUB_OUTPUT
- echo "netdata_branch=${NETDATA_CUSTOM_BRANCH}" >> $GITHUB_OUTPUT
- echo "netdata_pr_number=${NETDATA_CUSTOM_PR_NUMBER}" >> $GITHUB_OUTPUT
- echo "netdata_commit_hash=${NETDATA_CUSTOM_COMMIT_HASH}" >> $GITHUB_OUTPUT
+
+ {
+ echo "netdata_repo=${NETDATA_CUSTOM_REPO}"
+ echo "netdata_branch=${NETDATA_CUSTOM_BRANCH}"
+ echo "netdata_pr_number=${NETDATA_CUSTOM_PR_NUMBER}"
+ echo "netdata_commit_hash=${NETDATA_CUSTOM_COMMIT_HASH}"
+ } >> "$GITHUB_OUTPUT"
- name: Trigger Full Cloud Regression
uses: aurelien-baudet/workflow-dispatch@v2
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 8d6cb70ead..34f2aafd82 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -333,7 +333,7 @@ jobs:
- name: Create and Push Manifest
id: manifest
if: github.repository == 'netdata/netdata'
- run: docker buildx imagetools create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests '' ${{ needs.gen-tags.outputs.tags }})
+ run: docker buildx imagetools create "$(.github/scripts/gen-docker-imagetool-args.py /tmp/digests '' "${{ needs.gen-tags.outputs.tags }}")"
- name: Failure Notification
uses: rtCamp/action-slack-notify@v2
env:
@@ -489,7 +489,7 @@ jobs:
- name: Create and Push Manifest
id: manifest
if: github.repository == 'netdata/netdata'
- run: docker buildx imagetools create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests 'quay.io' ${{ needs.gen-tags.outputs.tags }})
+ run: docker buildx imagetools create "$(.github/scripts/gen-docker-imagetool-args.py /tmp/digests 'quay.io' "${{ needs.gen-tags.outputs.tags }}")"
- name: Failure Notification
uses: rtCamp/action-slack-notify@v2
env:
@@ -645,7 +645,7 @@ jobs:
- name: Create and Push Manifest
id: manifest
if: github.repository == 'netdata/netdata'
- run: docker buildx imagetools create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests 'ghcr.io' ${{ needs.gen-tags.outputs.tags }})
+ run: docker buildx imagetools create "$(.github/scripts/gen-docker-imagetool-args.py /tmp/digests 'ghcr.io' "${{ needs.gen-tags.outputs.tags }}")"
- name: Failure Notification
uses: rtCamp/action-slack-notify@v2
env:
diff --git a/.github/workflows/generate-integrations.yml b/.github/workflows/generate-integrations.yml
index f7d4df866d..8287f92959 100644
--- a/.github/workflows/generate-integrations.yml
+++ b/.github/workflows/generate-integrations.yml
@@ -79,9 +79,7 @@ jobs:
SLACK_MESSAGE: |-
${{ github.repository }}: Failed to create PR rebuilding integrations.js
Checkout Agent: ${{ steps.checkout-agent.outcome }}
- Get Go Ref: ${{ steps.get-go-ref.outcome }}
- Checkout Go: ${{ steps.checkout-go.outcome }}
- Prepare Dependencies: ${{ steps.prep-deps.outcome }}
+ Prep python env and deps: ${{ steps.prep-deps.outcome }}
Generate Integrations: ${{ steps.generate.outcome }}
Generate Integrations Documentation: ${{ steps.generate-integrations-documentation.outcome }}
Generate src/collectors/COLLECTORS.md: ${{ steps.generate-collectors-md.outcome }}
diff --git a/.github/workflows/monitor-releases.yml b/.github/workflows/monitor-releases.yml
index 69c84b2812..77ec06bcf5 100644
--- a/.github/workflows/monitor-releases.yml
+++ b/.github/workflows/monitor-releases.yml
@@ -31,7 +31,7 @@ jobs:
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "RELEASE_CHANNEL=${{ github.event.inputs.channel }}" >> "${GITHUB_ENV}"
- else:
+ else
echo "RELEASE_CHANNEL=stable" >> "${GITHUB_ENV}"
fi
- name: Init Python environment
diff --git a/.github/workflows/repoconfig-packages.yml b/.github/workflows/repoconfig-packages.yml
index f3d65a3e17..8975fa4d49 100644
--- a/.github/workflows/repoconfig-packages.yml
+++ b/.github/workflows/repoconfig-packages.yml
@@ -126,13 +126,14 @@ jobs:
id: package-upload
if: github.event_name != 'pull_request' && github.repository == 'netdata/netdata'
run: |
- for arch in ${{ matrix.arches }}; do
- for suffix in '' -edge -repoconfig ; do
+ # shellcheck disable=SC2043
+ for arch in "${{ matrix.arches }}"; do
+ for suffix in '' -edge -repoconfig; do
.github/scripts/package-upload.sh \
- ${{ matrix.pkgclouddistro }} \
- ${arch} \
- ${{ matrix.format }} \
- netdata/netdata${suffix}
+ "${{ matrix.pkgclouddistro }}" \
+ "${arch}" \
+ "${{ matrix.format }}" \
+ netdata/netdata"${suffix}"
done
done
- name: Failure Notification
diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml
index c7b0381351..30b09ec065 100644
--- a/.github/workflows/review.yml
+++ b/.github/workflows/review.yml
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
actionlint: ${{ steps.actionlint.outputs.run }}
- clangformat: ${{ steps.clangformat.outputs.run }}
+ # clangformat: ${{ steps.clangformat.outputs.run }}
flake8: ${{ steps.flake8.outputs.run }}
golangci-lint: ${{ steps.golangci-lint.outputs.run }}
hadolint: ${{ steps.hadolint.outputs.run }}
@@ -65,11 +65,11 @@ jobs:
run: |
if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/golangci-lint') }}" = "true" ]; then
echo "run=true" >> "${GITHUB_OUTPUT}"
- elif git diff --name-only origin/${{ github.base_ref }} HEAD -- | grep -Eq '.*\.go' ; then
- echo "run=true" >> $GITHUB_OUTPUT
+ elif git diff --name-only origin/"${{ github.base_ref }}" HEAD -- | grep -Eq '.*\.go'; then
+ echo "run=true" >> "${GITHUB_OUTPUT}"
echo 'Go code has changed, need to run golangci-lint.'
else
- echo "run=false" >> $GITHUB_OUTPUT
+ echo "run=false" >> "${GITHUB_OUTPUT}"
fi
- name: Check files for hadolint
id: hadolint
@@ -122,38 +122,38 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
- clang-format:
- name: clang-format
- needs: prep-review
- if: needs.prep-review.outputs.clangformat == 'true'
- runs-on: ubuntu-latest
- steps:
- - name: Git clone repository
- uses: actions/checkout@v4
- with:
- submodules: false
- fetch-depth: 0
- - name: Check for label
- id: label
- run: |
- if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/clang-format') }}" = "true" ]; then
- echo 'check-all=true' >> "${GITHUB_OUTPUT}"
- else
- echo 'check-all=false' >> "${GITHUB_OUTPUT}"
- fi
- - name: Run clang-format
- run: |
- if [ "${{ steps.label.outputs.check-all }}" == 'true' ]; then
- find . -regex '.*\.\(c\|cpp\|cxx\|h\|hpp\|hxx\)$' -exec clang-format -i --style=file '{}' \;
- else
- git diff --name-only origin/${{ github.base_ref }} HEAD | grep -E '\.cpp$|\.cxx$|\.c$|\.hpp$|\.hxx$|\.h$' | \
- xargs -n 1 -r clang-format -i --style=file
- fi
- git status --porcelain=v1 > /tmp/porcelain
- if [ -s /tmp/porcelain ]; then
- cat /tmp/porcelain
- exit 1
- fi
+# clang-format:
+# name: clang-format
+# needs: prep-review
+# if: needs.prep-review.outputs.clangformat == 'true'
+# runs-on: ubuntu-latest
+# steps:
+# - name: Git clone repository
+# uses: actions/checkout@v4
+# with:
+# submodules: false
+# fetch-depth: 0
+# - name: Check for label
+# id: label
+# run: |
+# if [ "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/clang-format') }}" = "true" ]; then
+# echo 'check-all=true' >> "${GITHUB_OUTPUT}"
+# else
+# echo 'check-all=false' >> "${GITHUB_OUTPUT}"
+# fi
+# - name: Run clang-format
+# run: |
+# if [ "${{ steps.label.outputs.check-all }}" == 'true' ]; then
+# find . -regex '.*\.\(c\|cpp\|cxx\|h\|hpp\|hxx\)$' -exec clang-format -i --style=file '{}' \;
+# else
+# git diff --name-only origin/${{ github.base_ref }} HEAD | grep -E '\.cpp$|\.cxx$|\.c$|\.hpp$|\.hxx$|\.h$' | \
+# xargs -n 1 -r clang-format -i --style=file
+# fi
+# git status --porcelain=v1 > /tmp/porcelain
+# if [ -s /tmp/porcelain ]; then
+# cat /tmp/porcelain
+# exit 1
+# fi
flake8:
name: flake8