[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] ci: add README and makefile for containers
commit 6ad06c9e4f93352b5034cdd4e7bceac389fbba7a Author: Doug Goldstein <cardoe@xxxxxxxxxx> AuthorDate: Mon Mar 12 22:15:07 2018 -0500 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Thu Mar 22 09:04:23 2018 +0000 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> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- automation/build/Makefile | 17 +++++++++++++++++ automation/build/README.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/automation/build/Makefile b/automation/build/Makefile new file mode 100644 index 0000000000..773b16037c --- /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 0000000000..0206d57e03 --- /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. -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |