mirror of
https://github.com/netdata/netdata.git
synced 2025-03-14 21:22:57 +00:00
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>
This commit is contained in:
parent
1cc14e2f3d
commit
90b2860fcd
7 changed files with 58 additions and 57 deletions
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -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 }}
|
||||
|
|
15
.github/workflows/cloud_regression.yml
vendored
15
.github/workflows/cloud_regression.yml
vendored
|
@ -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
|
||||
|
|
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
|
@ -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:
|
||||
|
|
4
.github/workflows/generate-integrations.yml
vendored
4
.github/workflows/generate-integrations.yml
vendored
|
@ -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 }}
|
||||
|
|
2
.github/workflows/monitor-releases.yml
vendored
2
.github/workflows/monitor-releases.yml
vendored
|
@ -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
|
||||
|
|
13
.github/workflows/repoconfig-packages.yml
vendored
13
.github/workflows/repoconfig-packages.yml
vendored
|
@ -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
|
||||
|
|
72
.github/workflows/review.yml
vendored
72
.github/workflows/review.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue