From: Cédric Ollivier Date: Wed, 27 Sep 2017 19:07:58 +0000 (+0200) Subject: Add post_push hooks X-Git-Tag: opnfv-5.0.RC1~46 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=4108e6a707b39872be8714d6e54984a93f920413;p=functest.git Add post_push hooks It allows creating the stable tags as allowed by Docker hub [1]. [1] https://github.com/docker/hub-feedback/issues/341 Change-Id: I84909b20fc8b926eb5414db7d57100aaa6060f84 Signed-off-by: Cédric Ollivier --- diff --git a/docker/components/hooks/post_push b/docker/components/hooks/post_push new file mode 100644 index 000000000..26a27dd6c --- /dev/null +++ b/docker/components/hooks/post_push @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:stable" +docker push "${DOCKER_REPO}:stable" + +exit $? diff --git a/docker/core/hooks/post_push b/docker/core/hooks/post_push new file mode 100644 index 000000000..26a27dd6c --- /dev/null +++ b/docker/core/hooks/post_push @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:stable" +docker push "${DOCKER_REPO}:stable" + +exit $? diff --git a/docker/features/hooks/post_push b/docker/features/hooks/post_push new file mode 100644 index 000000000..26a27dd6c --- /dev/null +++ b/docker/features/hooks/post_push @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:stable" +docker push "${DOCKER_REPO}:stable" + +exit $? diff --git a/docker/healthcheck/hooks/post_push b/docker/healthcheck/hooks/post_push new file mode 100644 index 000000000..26a27dd6c --- /dev/null +++ b/docker/healthcheck/hooks/post_push @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:stable" +docker push "${DOCKER_REPO}:stable" + +exit $? diff --git a/docker/parser/hooks/post_push b/docker/parser/hooks/post_push new file mode 100644 index 000000000..26a27dd6c --- /dev/null +++ b/docker/parser/hooks/post_push @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:stable" +docker push "${DOCKER_REPO}:stable" + +exit $? diff --git a/docker/restapi/hooks/post_push b/docker/restapi/hooks/post_push new file mode 100644 index 000000000..26a27dd6c --- /dev/null +++ b/docker/restapi/hooks/post_push @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:stable" +docker push "${DOCKER_REPO}:stable" + +exit $? diff --git a/docker/smoke/hooks/post_push b/docker/smoke/hooks/post_push new file mode 100644 index 000000000..26a27dd6c --- /dev/null +++ b/docker/smoke/hooks/post_push @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:stable" +docker push "${DOCKER_REPO}:stable" + +exit $? diff --git a/docker/vnf/hooks/post_push b/docker/vnf/hooks/post_push new file mode 100644 index 000000000..26a27dd6c --- /dev/null +++ b/docker/vnf/hooks/post_push @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +docker tag "${IMAGE_NAME}" "${DOCKER_REPO}:stable" +docker push "${DOCKER_REPO}:stable" + +exit $?