Skip to content

templating#90

Merged
gmanchon merged 5 commits into
mainfrom
build-templating
Jun 2, 2026
Merged

templating#90
gmanchon merged 5 commits into
mainfrom
build-templating

Conversation

@gmanchon

@gmanchon gmanchon commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

adds liquid templating

replaces partials substituted constants <PYTHON_VERSION> with variables {{ PYTHON_VERSION }}

replaces partials delimiter-structured blocks :

$MAC_START
  ...
$MAC_END
$WINDOWS_START
  ...
$WINDOWS_END
$LINUX_START
  ...
$LINUX_END

with conditionals :

{% if os == "macos" %}
  ...
{% elsif os == "windows" %}
  ...
{% elsif os == "linux" %}
  ...
{% endif %}

no diffs in generated localised build files appart from blank lines

specific repo diffs

replicates lewagon/data-setup#361

removes the private key sample which is rejected by github when commit is pushed

@gmanchon gmanchon merged commit ca03c1b into main Jun 2, 2026
1 check passed
@gmanchon

gmanchon commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Hello @lorcanrae 👋

I updated the build gha from the one of the DS setup in order to support liquid templating and simplify the edition of the _partials instructions

The main differences in the code structure are :

  • the variables available to all partials, as {{ PYTHON_VERSION }}, are stored in constants/constants.yml
  • the formulas are now stored in builds in yaml format, for example builds/LINUX.yml
  • it will soon be possible to parametrise a partial in order to adapt its content to the setup it is called from

Almost no changes are made to the existing instructions, appart from the following...

A few check references that went missing are now back :

Screenshot 2026-06-02 at 17 45 41

GitHub now scans private key patterns so the sample provided was adapted :

Screenshot 2026-06-02 at 17 46 01

The gha will soon be replicated in the data analytics and web deb setups

@gmanchon gmanchon requested a review from krokrob June 2, 2026 15:48
@lorcanrae

Copy link
Copy Markdown
Contributor

Hey @gmanchon 👋

It looks intuitive and easy enough to port to automated-main where I made heavier use of partials delimiter blocks for OS specific instructions

@gmanchon

gmanchon commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@lorcanrae wow that's pretty dope, we should merge that setup in the main, I'm pretty sure we would have use cases for some B2B or B2C cases, WDYT ?

@gmanchon gmanchon deleted the build-templating branch June 3, 2026 08:35
@gmanchon gmanchon mentioned this pull request Jun 3, 2026
@lorcanrae

Copy link
Copy Markdown
Contributor

Glad you like it @gmanchon! Delivery primarily on a VM made it easier to automate. Feedback from students and teachers has only been positive so far.

Happy to merge into main, but it would be worth archiving current main to a named branch for fallback.

Before merging there are some curl paths that need to be corrected for .tf and ansible files. Does liquid expose the current branch name or is it a more naive template engine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants