From a9463b1954d870ae4841882619b34f3fedfa32b3 Mon Sep 17 00:00:00 2001 From: Jose Raul Barreras <barreras@unl.edu> Date: Thu, 30 May 2019 15:36:27 -0500 Subject: [PATCH] add automatic README.md update --- Makefile | 9 +++++++++ _README.md | 17 +++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 _README.md diff --git a/Makefile b/Makefile index 4c20545..04c4ddb 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,14 @@ publish: docker push $$image; \ done +#Update README.md based on the template ._README.md +TOOLSET := `echo "$(sort $(IMAGES_TO_PUBLISH))" | sed -e "s/ /\n - /g"))` +README_HEAD = `cat ./_README.md | sed -e 's/%CONTAINERS_LIST%.*//g'` +README_TAIL = `cat ./_README.md | sed -e '1,/%CONTAINERS_LIST%/d'` + +update_readme: + @echo "$(README_HEAD)\n - $(TOOLSET) $(README_TAIL)" | sed -e "s/%LAST_UPDATE%/\n_Last update: `date`_ \n/g" > README.md + delete_dangling_images: @echo "Removing dangling images" @docker image prune -f @@ -126,6 +134,7 @@ help: @echo -e "make [all] \n\t # Creates all the images" @echo -e "make <TARGET> \n\t # Creates an specific image" @echo -e "make publish \n\t # Push the images to the UNL registry" + @echo -e "make update_readme \n\t Update the README.md file" # @echo -e "make security \n\t # Send the images to Tenable. Use env variables TENABLE_IO_ACCESS_KEY and TENABLE_IO_SECRET_KEY" debug: diff --git a/_README.md b/_README.md new file mode 100644 index 0000000..248f07d --- /dev/null +++ b/_README.md @@ -0,0 +1,17 @@ +[](https://git.unl.edu/unl-its/docker-ci/commits/develop) + +# Docker-ci + +## Containers usefull in CI process + +### Building Images + +To build these images, clone this repository onto a machine with docker and make installed. Run `make` and all of the images will be built and installed as local docker images. +This file is automatically updated after execute `git commit` based on the content of file `_README.md` + +### Tools available: + +%CONTAINERS_LIST% + +%LAST_UPDATE% + -- GitLab