Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Replace j2cli with jinjanator in GitHub workflows #183

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
python-version: 3.x

- run: |
pip3 install --user --upgrade j2cli
pip3 install --user --upgrade jinjanator
ln -s ~/.local/bin/jinjanate ~/.local/bin/j2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, why soft link and not replace line on j2 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to break local workflows for now. There also an issue on jinjanator to make it a drop-in replacement: kpfleming/jinjanator#25

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you pin some python version meanwhile ? i.e 3.11 ?

j2 --version

- uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-containerd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
python-version: 3.x

- run: |
pip3 install --user --upgrade j2cli
pip3 install --user --upgrade jinjanator
ln -s ~/.local/bin/jinjanate ~/.local/bin/j2
j2 --version

- uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/image-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ jobs:
- name: Install the j2 dependency
if: startsWith(github.ref, 'refs/tags/')
run: |
pip3 install --user --upgrade j2cli
pip3 install --user --upgrade jinjanator
ln -s ~/.local/bin/jinjanate ~/.local/bin/j2
j2 --version

- name: Template release manifests
Expand Down
4 changes: 2 additions & 2 deletions hack/generate_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ templates_dir="$ROOT/templates"
for file in `ls $templates_dir/`; do
echo $file
if [ -z $CRIO_RUNTIME ]; then
j2 -e MULTUS_SOCKET_PATH -e IMAGE_REGISTRY -e IMAGE_TAG -e CRI_SOCKET_PATH -e NAMESPACE ${templates_dir}/$file -o "manifests/${file%.j2}"
j2 ${templates_dir}/$file -o "manifests/${file%.j2}"
else
if [ $file != "dynamic-networks-controller.yaml.j2" ]; then
continue
fi
j2 -e MULTUS_SOCKET_PATH -e CRIO_RUNTIME -e IMAGE_REGISTRY -e IMAGE_TAG -e CRI_SOCKET_PATH -e NAMESPACE ${templates_dir}/$file -o "manifests/crio-${file%.j2}"
j2 ${templates_dir}/$file -o "manifests/crio-${file%.j2}"
fi
done
unset IMAGE_REGISTRY
Expand Down