diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c0a8602 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/scripts/build_centos.sh \ No newline at end of file diff --git a/hooks/build b/hooks/build index e652051..4c49fff 100755 --- a/hooks/build +++ b/hooks/build @@ -8,7 +8,14 @@ for PACKAGER_REPO in ${PACKAGER_REPOS}; do - echo "Build Zammad Docker image from Packager.io ${PACKAGER_REPO} repo for DockerHubs ${DOCKER_REPO} repo" + echo "Build Zammad Docker image from Packager.io ${PACKAGER_REPO} repo for DockerHubs ${DOCKER_REPO}:${PACKAGER_REPO} repo" docker build --build-arg PACKAGER_REPO=${PACKAGER_REPO} --build-arg BUILD_DATE=$(date -u +”%Y-%m-%dT%H:%M:%SZ”) -t ${DOCKER_REPO}:${PACKAGER_REPO} . done + +if [ "${CREATE_LATEST}" == "yes" ]; then + + echo "Build Zammad Docker image from Packager.io ${LATEST_REPO} repo for DockerHubs ${DOCKER_REPO}:latest repo" + docker build --build-arg PACKAGER_REPO=${LATEST_REPO} --build-arg BUILD_DATE=$(date -u +”%Y-%m-%dT%H:%M:%SZ”) -t ${DOCKER_REPO}:latest . + +fi diff --git a/hooks/config b/hooks/config index 6faf97a..e036c9d 100755 --- a/hooks/config +++ b/hooks/config @@ -4,3 +4,5 @@ # PACKAGER_REPOS="stable develop" +CREATE_LATEST="no" +LATEST_REPO="develop" diff --git a/hooks/push b/hooks/push index 57f6c0b..904ab70 100755 --- a/hooks/push +++ b/hooks/push @@ -8,7 +8,14 @@ for PACKAGER_REPO in ${PACKAGER_REPOS}; do - echo "Push Zammad Docker image from Packager.io ${PACKAGER_REPO} repo to DockerHubs ${DOCKER_REPO} repo" + echo "Push Zammad Docker image from Packager.io ${PACKAGER_REPO} repo to DockerHubs ${DOCKER_REPO}:${PACKAGER_REPO} repo" docker push ${DOCKER_REPO}:${PACKAGER_REPO} done + +if [ "${CREATE_LATEST}" == "yes" ]; then + + echo "Push Zammad Docker image from Packager.io ${LATEST_REPO} repo to DockerHubs ${DOCKER_REPO}:latest repo" + docker push ${DOCKER_REPO}:latest + +fi