From: Maria Matejka Date: Thu, 19 Jun 2025 16:40:23 +0000 (+0200) Subject: CI: split make gitlab to local and venv variant X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5196d48d61771848a6e315be91e3eea973235cfe;p=thirdparty%2Fbird.git CI: split make gitlab to local and venv variant If you prefer to install python3-jinja2 and pyaml yourself, run gitlab-local. If you prefer the thing to create a venv and pip3 all the dependencies, run gitlab-venv. --- diff --git a/Makefile.in b/Makefile.in index 96a5b6eba..4429ee9fd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -204,15 +204,21 @@ cscope: cd $(srcdir) ; find $(dirs) -name '*.[chY]' > cscope.files ; cscope -b # Gitlab CI tests -gitlab: .gitlab-ci.yml +gitlab-venv: .gitlab-ci.yml +gitlab-venv: USE_VENV := VENV + +gitlab-local: .gitlab-ci.yml +gitlab-local: USE_VENV := + .gitlab-ci.yml: $(addprefix misc/gitlab/,pipeline.py data.yml.j2 template.yml.j2) - ( \ + ($(if $(USE_VENV),\ VENV=$$(mktemp -d); \ python3 -m venv $$VENV; \ . $$VENV/bin/activate; \ pip3 install jinja2 pyaml; \ - python3 misc/gitlab/pipeline.py > $@ \ - rm -rf $$VENV \ + ,) \ + python3 misc/gitlab/pipeline.py > $@; \ + $(if $(USE_VENV),rm -rf $$VENV,) \ ) # Install