Re: [PATCH 2/2] Add support for podman in Makefile.ci

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 10, 2019 at 10:08:05AM +0200, Andrea Bolognani wrote:
On Tue, 2019-05-07 at 17:45 +0200, Martin Kletzander wrote:
 	@echo
 	@echo "Available make variables:"
 	@echo
+	@echo "    CI_CENGINE=engine - container engine to use (podman (default) or docker)"
 	@echo "    CI_CLEAN=0 - do not delete '$(CI_SCRATCHDIR)' after completion"
 	@echo "    CI_REUSE=1 - re-use existing '$(CI_SCRATCHDIR)' content"
 	@echo

I have not looked at the code in detail, but I wanted to point this
out before you respin: I really don't like the name CI_CENGINE :)

Since we're dealing with containers exclusively I'm pretty sure we
can just go with CI_ENGINE and not cause any confusion for users.

The description given above is also not accurate, as far as I can
tell: we use Podman instead of Docker only if we detect that the
former is available, so what we really do is *prefer* Podman, not
default to it. I would document it along the lines of

 CI_ENGINE=auto - container engine to use (podman, docker)

and implement it like

 CI_ENGINE=auto

 # ...

 ifeq ($(CI_ENGINE),auto)
   CI_ENGINE = $(shell ...)

This needs an override directive [1], because make, see "Overriding" [2].  But
it still looks better, so I'll change v2 with this.

[1] https://www.gnu.org/software/make/manual/html_node/Override-Directive.html#Override-Directive
[2] https://www.gnu.org/software/make/manual/html_node/Overriding.html

 endif

 # Validate that CI_ENGINE is either podman or docker at this
 # point, and error out otherwise


I can't really do that, that would have to be in a rule to fail properly.  But
it's (kind of) done in ci-check-engine.  To check that it is one of the strings
I would have to parse it and check the first word, otherwise I couldn't do what
I can do now, e.g.:

 make -f Makefile.ci ci-check@debian-9 CI_ENGINE="podman --log-level=debug"

--
Andrea Bolognani / Red Hat / Virtualization

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux