diff --git a/Makefile b/Makefile index 4c20545e51887d4a43df5c4a4f80f71d614a9a97..04c4ddb0be224568e68ed53896ca1e121f478c9b 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 0000000000000000000000000000000000000000..248f07d2feaffe081b194f98e4613be589e653a4 --- /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% +