[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 1/8] ci: add README and makefile for containers
Add a basic README explaining the containers and how people can use them to locally test with if they see an error in CI and want to reproduce it locally. Added a makefile to help with building and pushing the containers to the container registry. Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> --- automation/build/Makefile | 17 +++++++++++++++++ automation/build/README.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 automation/build/Makefile create mode 100644 automation/build/README.md diff --git a/automation/build/Makefile b/automation/build/Makefile new file mode 100644 index 0000000..773b160 --- /dev/null +++ b/automation/build/Makefile @@ -0,0 +1,17 @@ + +# the base of where these containers will appear +REGISTRY := registry.gitlab.com/xen-project/xen + +help: + @echo "Builds containers for building Xen based on different distros" + @echo "To build one run 'make DISTRO/VERSION'. Available containers:" + @$(foreach file,$(sort $(subst .dockerfile,,$(wildcard */*.dockerfile))), \ + echo ${file} ; \ + ) + @echo "To push container builds, set the env var PUSH" + +%: %.dockerfile ## Builds containers + docker build -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D) + @if [ ! -z $${PUSH+x} ]; then \ + docker push $(REGISTRY)/$(@D):$(@F); \ + fi diff --git a/automation/build/README.md b/automation/build/README.md new file mode 100644 index 0000000..0206d57 --- /dev/null +++ b/automation/build/README.md @@ -0,0 +1,34 @@ +Docker Containers +================= + +These Docker containers should make it possible to build Xen in +any of the available environments on any system that supports +running Docker. They are organized by distro and tagged with +the version of that distro. They are available from the GitLab +Container Registry under the Xen project at: + +registry.gitlab.com/xen-project/xen/DISTRO:VERSION + +To see the list of available containers run `make` in this +directory. You will have to replace the `/` with a `:` to use +them. + +Building Xen +------------ + +From the top level of the source tree it should be possible to +run the following: + +docker run --rm -it -v $(PWD):/build -u $(id -u) -e CC=gcc $(CONTAINER) make + +There are other modifications that can be made but this will run +the `make` command inside the specified container. It will use your +currently checked out source tree to build with, ensure that file +permissions remain consistent and clean up after itself. + +Building a container +-------------------- + +There is a makefile to make this process easier. You should be +able to run `make DISTRO/VERSION` to have Docker build the container +for you. -- git-series 0.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |