Skip to content

Commit ca09d96

Browse files
authored
update dependencies & add hadolint config & fix markdownlint (#526)
1 parent 4d5535d commit ca09d96

File tree

8 files changed

+32
-9
lines changed

8 files changed

+32
-9
lines changed

.github/workflows/pr_pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
persist-credentials: false
2020
fetch-depth: 0
21-
- uses: stackabletech/actions/run-pre-commit@4bfd3b65f22af597fe784599c077dc34bf5894a7 # v0.8.0
21+
- uses: stackabletech/actions/run-pre-commit@9aae2d1c14239021bfa33c041010f6fb7adec815 # v0.8.2
2222
with:
2323
python-version: ${{ env.PYTHON_VERSION }}
2424
hadolint: ${{ env.HADOLINT_VERSION }}

template/.github/workflows/build.yml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ jobs:
340340
with:
341341
persist-credentials: false
342342
submodules: recursive
343-
- uses: cachix/install-nix-action@754537aaedb35f72ab11a60cc162c49ef3016495 # v31.2.0
343+
- uses: cachix/install-nix-action@17fe5fb4a23ad6cbbe47d6b3f359611ad276644c # v31.4.0
344344
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
345345
with:
346346
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
@@ -378,7 +378,7 @@ jobs:
378378
- name: Install cosign
379379
uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
380380
- name: Install syft
381-
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0
381+
uses: anchore/sbom-action/download-syft@e11c554f704a0b820cbf8c51673f6945e0731532 # v0.20.0
382382
- name: Build Docker image and Helm chart
383383
run: |
384384
# Installing helm and yq on ubicloud-standard-8-arm only

template/.github/workflows/integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
if: ${{ failure() }}
9898
env:
9999
SLACK_BOT_TOKEN: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }}
100-
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
100+
uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
101101
with:
102102
channel-id: "C07UYJYSMSN" # notifications-integration-tests
103103
payload: |

template/.github/workflows/pr_pre-commit.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
persist-credentials: false
2727
submodules: recursive
2828
fetch-depth: 0
29-
- uses: stackabletech/actions/run-pre-commit@4bfd3b65f22af597fe784599c077dc34bf5894a7 # v0.8.0
29+
- uses: stackabletech/actions/run-pre-commit@9aae2d1c14239021bfa33c041010f6fb7adec815 # v0.8.2
3030
with:
3131
python-version: ${{ env.PYTHON_VERSION }}
3232
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}

template/.hadolint.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
ignored:
3+
# Warning: Use the -y switch to avoid manual input dnf install -y <package>
4+
# https://github.com/hadolint/hadolint/wiki/DL3038
5+
# Reason: We set `assumeyes=True` in dnf.conf in our base image
6+
- DL3038
7+
8+
# Warning: Specify version with dnf install -y <package>-<version>
9+
# https://github.com/hadolint/hadolint/wiki/DL3041
10+
# Reason: It's good advice, but we're not set up to pin versions just yet
11+
- DL3041

template/.markdownlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ MD033:
2222
MD024:
2323
# Only check sibling headings
2424
siblings_only: true
25+
26+
# MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading
27+
MD041: false # Github issues and PRs already have titles, and H1 is enormous in the description box.

template/.pre-commit-config.yaml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ repos:
1515
- id: detect-private-key
1616

1717
- repo: https://github.com/adrienverge/yamllint
18-
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
18+
rev: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # 1.37.0
1919
hooks:
2020
- id: yamllint
2121

2222
- repo: https://github.com/igorshubovych/markdownlint-cli
23-
rev: 586c3ea3f51230da42bab657c6a32e9e66c364f0 # 0.44.0
23+
rev: 192ad822316c3a22fb3d3cc8aa6eafa0b8488360 # 0.45.0
2424
hooks:
2525
- id: markdownlint
2626
types: [text]
@@ -36,7 +36,7 @@ repos:
3636
# If you do not, you will need to delete the cached ruff binary shown in the
3737
# error message
3838
- repo: https://github.com/astral-sh/ruff-pre-commit
39-
rev: 2c8dce6094fa2b4b668e74f694ca63ceffd38614 # 0.9.9
39+
rev: d19233b89771be2d89273f163f5edc5a39bbc34a # 0.11.12
4040
hooks:
4141
# Run the linter.
4242
- id: ruff

template/docker/Dockerfile.j2

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# syntax=docker/dockerfile:1.15.1@sha256:9857836c9ee4268391bb5b09f9f157f3c91bb15821bb77969642813b0d00518d
1+
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
22
# NOTE: The syntax directive needs to be the first line in a Dockerfile
33
# Find the latest versions here: https://hub.docker.com/r/docker/dockerfile/tags
44
# And the changelogs: https://docs.docker.com/build/buildkit/dockerfile-release-notes/ or https://github.com/moby/buildkit/releases
@@ -27,6 +27,13 @@ ARG RELEASE="1"
2727
ARG STACKABLE_USER_GID="574654813"
2828
ARG STACKABLE_USER_UID="782252253"
2929

30+
# Sets the default shell to Bash with strict error handling and robust pipeline processing.
31+
# "-e": Exits immediately if a command exits with a non-zero status
32+
# "-u": Treats unset variables as an error, preventing unexpected behavior from undefined variables.
33+
# "-o pipefail": Causes a pipeline to return the exit status of the last command in the pipe that failed, ensuring errors in any part of a pipeline are not ignored.
34+
# "-c": Allows the execution of commands passed as a string
35+
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
36+
3037
# These labels have mostly been superceded by the OpenContainer spec annotations below but it doesn't hurt to include them
3138
# http://label-schema.org/rc1/
3239
LABEL name="Stackable Operator for {[ operator.pretty_string }]"
@@ -75,6 +82,8 @@ assumeyes=True
7582
tsflags=nodocs
7683
EOF
7784

85+
# It complains about echo flags not being available in POSIX sh but we set the shell to bash
86+
# hadolint ignore=SC3037
7887
RUN <<EOF
7988
# Update image and install kerberos client libraries as well as some other utilities
8089
microdnf update

0 commit comments

Comments
 (0)