Skip to content

Commit 468db2c

Browse files
committed
Update templated files to rev d69b8bd (#179)
Automatically created PR based on commit d69b8bdd50658eb4e9f7453c9cc2ce5ce64d5130 in stackabletech/operator-templating repo. Triggered by: Manual run triggered by: siegfriedweber with message [Install protoc in the GitHub workflows]
1 parent 6a6f1ba commit 468db2c

File tree

6 files changed

+49
-5
lines changed

6 files changed

+49
-5
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
6666
with:
6767
submodules: recursive
68-
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # tag=v4
68+
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
6969
- name: Install requirements for version tool
7070
run: pip install -r python/requirements.txt
7171
- id: prerelease
@@ -292,7 +292,7 @@ jobs:
292292
run: git diff --exit-code
293293
- name: Git Diff showed uncommitted changes
294294
if: ${{ failure() }}
295-
uses: actions/github-script@7a5c598405937d486b0331594b5da2b14db670da # tag=v6
295+
uses: actions/github-script@d50f485531ba88479582bc2da03ff424389af5c1 # tag=v6
296296
with:
297297
script: |
298298
core.setFailed('Committed charts were not up to date, please regenerate and re-commit!')
@@ -340,7 +340,7 @@ jobs:
340340
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
341341
with:
342342
submodules: recursive
343-
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # tag=v4
343+
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
344344
if: ${{ github.event_name == 'pull_request' }}
345345
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
346346
with:

.github/workflows/reviewdog.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
25-
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # tag=v4
25+
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
2626
with:
2727
python-version: "3.9"
2828
- uses: reviewdog/action-flake8@b6435e67f0cfda225b9e0c9283cfb7ea7c551bdb # tag=v3.6.0

.yamllint.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ rules:
1010
check-keys: false
1111
comments:
1212
min-spaces-from-content: 1 # Needed due to https://github.com/adrienverge/yamllint/issues/443
13+
indentation:
14+
indent-sequences: consistent

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ IS_NIGHTLY := $(shell echo "${VERSION}" | grep -- '-nightly$$')
1717
DOCS_VERSION := $(if ${IS_NIGHTLY},nightly,$(shell echo "${VERSION}" | sed 's/^\([0-9]\+\.[0-9]\+\)\..*$$/\1/'))
1818
export VERSION IS_NIGHTLY DOCS_VERSION
1919

20-
SHELL=/bin/bash -euo pipefail
20+
SHELL=/usr/bin/env bash -euo pipefail
2121

2222
## Docker related targets
2323
docker-build:

deploy/DO_NOT_EDIT.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ directory manually.
55
The following files are ok to edit:
66

77
- helm/secret-operator/templates/roles.yaml
8+
- helm/secret-operator/values.yaml
89

910
The details are in-motion but check this repository for a few details:
1011
<https://github.com/stackabletech/operator-templating>

scripts/docs_templating.sh

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Reads a file with variables to insert into templates, and templates all .*.j2 files
5+
# in the 'docs' directory.
6+
#
7+
# dependencies
8+
# pip install jinja2-cli
9+
10+
docs_dir="$(dirname "$0")/../docs"
11+
templating_vars_file="$docs_dir/templating_vars.yaml"
12+
13+
# Check if files need templating
14+
if [[ -z $(find "$docs_dir" -name '*.j2') ]];
15+
then
16+
echo "No files need templating, exiting."
17+
exit
18+
fi
19+
20+
# Check if jinja2 is there
21+
if ! command -v jinja2 &> /dev/null
22+
then
23+
echo "jinja2 could not be found. Use 'pip install jinja2-cli' to install it."
24+
exit
25+
fi
26+
27+
# Check if templating vars file exists
28+
if [[ ! -f "$templating_vars_file" ]];
29+
then
30+
echo "$templating_vars_file does not exist, cannot start templating."
31+
fi
32+
33+
find "$docs_dir" -name '*.j2' |
34+
while read -r file
35+
do
36+
new_file_name=${file%.j2} # Remove .j2 suffix
37+
echo "templating $new_file_name"
38+
jinja2 "$file" "$templating_vars_file" -o "$new_file_name"
39+
done
40+
41+
echo "done"

0 commit comments

Comments
 (0)