From 68a42d0f6a89c5b529b6c2b0faf2bebe0b7356d5 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 5 Jan 2023 08:30:01 +0400 Subject: [PATCH] dkbuild: maj templates --- dkbuild | 3 +++ lib/dkbuild/templates/image/common/Dockerfile.in | 3 +++ lib/dkbuild/templates/image/d10/.dockerignore | 2 -- lib/dkbuild/templates/image/d10/.gitignore | 3 --- lib/dkbuild/templates/image/d10/dkbuild | 11 ----------- lib/dkbuild/templates/image/d10/dkbuild.env | 1 - lib/dkbuild/templates/image/d11/dkbuild | 8 ++++---- lib/dkbuild/templates/image/d9/.dockerignore | 2 -- lib/dkbuild/templates/image/d9/.gitignore | 3 --- lib/dkbuild/templates/image/d9/dkbuild | 11 ----------- lib/dkbuild/templates/image/d9/dkbuild.env | 1 - lib/dkbuild/templates/image/dkbuild | 6 ------ lib/dkbuild/templates/php/dkbuild | 2 -- lib/dkbuild/templates/php/dkbuild.env | 1 + 14 files changed, 11 insertions(+), 46 deletions(-) create mode 100644 lib/dkbuild/templates/image/common/Dockerfile.in delete mode 100644 lib/dkbuild/templates/image/d10/.dockerignore delete mode 100644 lib/dkbuild/templates/image/d10/.gitignore delete mode 100644 lib/dkbuild/templates/image/d10/dkbuild delete mode 120000 lib/dkbuild/templates/image/d10/dkbuild.env delete mode 100644 lib/dkbuild/templates/image/d9/.dockerignore delete mode 100644 lib/dkbuild/templates/image/d9/.gitignore delete mode 100644 lib/dkbuild/templates/image/d9/dkbuild delete mode 120000 lib/dkbuild/templates/image/d9/dkbuild.env diff --git a/dkbuild b/dkbuild index 94eac92..bae9ef5 100755 --- a/dkbuild +++ b/dkbuild @@ -1102,6 +1102,9 @@ function load_environ() { function define_functions_env() { function setversion() { [ -n "$SETVERSION_DONE" ] && return + # sans argument, retourner 0 + [ $# -eq 0 ] && return + local from_file from_repo from_glob extract while [ $# -gt 0 ]; do case "$1" in diff --git a/lib/dkbuild/templates/image/common/Dockerfile.in b/lib/dkbuild/templates/image/common/Dockerfile.in new file mode 100644 index 0000000..1d70940 --- /dev/null +++ b/lib/dkbuild/templates/image/common/Dockerfile.in @@ -0,0 +1,3 @@ +# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 +FROM $REGISTRY/debian/min:$DIST +#RUN /debian/pkg i diff --git a/lib/dkbuild/templates/image/d10/.dockerignore b/lib/dkbuild/templates/image/d10/.dockerignore deleted file mode 100644 index 3e8889e..0000000 --- a/lib/dkbuild/templates/image/d10/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -/b/t/ -**/.git/ diff --git a/lib/dkbuild/templates/image/d10/.gitignore b/lib/dkbuild/templates/image/d10/.gitignore deleted file mode 100644 index fda9f96..0000000 --- a/lib/dkbuild/templates/image/d10/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/b/ -/Dockerfile -# autogénéré diff --git a/lib/dkbuild/templates/image/d10/dkbuild b/lib/dkbuild/templates/image/d10/dkbuild deleted file mode 100644 index d48a3e5..0000000 --- a/lib/dkbuild/templates/image/d10/dkbuild +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 -setdists d10 - -# fichiers communs -copy ../common/ ./ gitignore=. - -dockerfile - # -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 - FROM $REGISTRY/debian/min:$DIST - #RUN /debian/pkg i -build diff --git a/lib/dkbuild/templates/image/d10/dkbuild.env b/lib/dkbuild/templates/image/d10/dkbuild.env deleted file mode 120000 index 404ac4d..0000000 --- a/lib/dkbuild/templates/image/d10/dkbuild.env +++ /dev/null @@ -1 +0,0 @@ -../dkbuild.env \ No newline at end of file diff --git a/lib/dkbuild/templates/image/d11/dkbuild b/lib/dkbuild/templates/image/d11/dkbuild index 35547e5..06a71e1 100644 --- a/lib/dkbuild/templates/image/d11/dkbuild +++ b/lib/dkbuild/templates/image/d11/dkbuild @@ -4,8 +4,8 @@ setdists d11 # fichiers communs copy ../common/ ./ gitignore=. -dockerfile - # -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 - FROM $REGISTRY/debian/min:$DIST - #RUN /debian/pkg i +dockerfile "" Dockerfile.in sed=" +s/\\\$REGISTRY/$REGISTRY/ +s/\\\$DIST/$DIST/ +" build diff --git a/lib/dkbuild/templates/image/d9/.dockerignore b/lib/dkbuild/templates/image/d9/.dockerignore deleted file mode 100644 index 3e8889e..0000000 --- a/lib/dkbuild/templates/image/d9/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -/b/t/ -**/.git/ diff --git a/lib/dkbuild/templates/image/d9/.gitignore b/lib/dkbuild/templates/image/d9/.gitignore deleted file mode 100644 index fda9f96..0000000 --- a/lib/dkbuild/templates/image/d9/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/b/ -/Dockerfile -# autogénéré diff --git a/lib/dkbuild/templates/image/d9/dkbuild b/lib/dkbuild/templates/image/d9/dkbuild deleted file mode 100644 index 77ca4e1..0000000 --- a/lib/dkbuild/templates/image/d9/dkbuild +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 -setdists d9 - -# fichiers communs -copy ../common/ ./ gitignore=. - -dockerfile - # -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 - FROM $REGISTRY/debian/min:$DIST - #RUN /debian/pkg i -build diff --git a/lib/dkbuild/templates/image/d9/dkbuild.env b/lib/dkbuild/templates/image/d9/dkbuild.env deleted file mode 120000 index 404ac4d..0000000 --- a/lib/dkbuild/templates/image/d9/dkbuild.env +++ /dev/null @@ -1 +0,0 @@ -../dkbuild.env \ No newline at end of file diff --git a/lib/dkbuild/templates/image/dkbuild b/lib/dkbuild/templates/image/dkbuild index 6fece57..6914a55 100644 --- a/lib/dkbuild/templates/image/dkbuild +++ b/lib/dkbuild/templates/image/dkbuild @@ -1,15 +1,9 @@ # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 dists=( d11 - d10 - #d9 ) setdists "${dists[@]}" if dist d11; then include d11 -elif dist d10; then - include d10 -elif dist d9; then - include d9 fi diff --git a/lib/dkbuild/templates/php/dkbuild b/lib/dkbuild/templates/php/dkbuild index 5b5be0d..833fb55 100644 --- a/lib/dkbuild/templates/php/dkbuild +++ b/lib/dkbuild/templates/php/dkbuild @@ -1,6 +1,4 @@ # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 -setenv DIST=d11 - if profile prod; then default checkout branch=master elif profile test devel; then diff --git a/lib/dkbuild/templates/php/dkbuild.env b/lib/dkbuild/templates/php/dkbuild.env index f24dcb1..31ee4d9 100644 --- a/lib/dkbuild/templates/php/dkbuild.env +++ b/lib/dkbuild/templates/php/dkbuild.env @@ -1,3 +1,4 @@ # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 setenv REGISTRY=docker.univ-reunion.fr setenv IMAGE=$REGISTRY/GROUP/NAME +setenv DIST=d11