From 2fbbccccece521bf0cdec6b52de3a7a074b3ce09 Mon Sep 17 00:00:00 2001 From: AlexandrKharitonov <75480173+AleksandrKharitonov@users.noreply.github.com> Date: Thu, 6 Jan 2022 11:46:31 +0300 Subject: [PATCH] add hooks --- hooks/build | 5 +++++ hooks/post_push | 7 +++++++ hooks/push | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 hooks/build create mode 100644 hooks/post_push create mode 100644 hooks/push diff --git a/hooks/build b/hooks/build new file mode 100644 index 0000000..ed98433 --- /dev/null +++ b/hooks/build @@ -0,0 +1,5 @@ +#!/bin/bash + +sed -i '/trap clean_exit SIGTERM/s/^/#/' run-document-server.sh + +docker build -f $DOCKERFILE_PATH -t $IMAGE_NAME diff --git a/hooks/post_push b/hooks/post_push new file mode 100644 index 0000000..914a4d7 --- /dev/null +++ b/hooks/post_push @@ -0,0 +1,7 @@ +#!/bin/bash + +NEW_TAG=6.4.2 +NEW_IMAGE_NAME=$DOCKER_REPO:$NEW_TAG + +docker tag $IMAGE_NAME $NEW_IMAGE_NAME +docker push $NEW_IMAGE_NAME diff --git a/hooks/push b/hooks/push new file mode 100644 index 0000000..fa447ed --- /dev/null +++ b/hooks/push @@ -0,0 +1,3 @@ +#!/bin/bash + +docker push $IMAGE_NAME