Skip to content

Commit

Permalink
Merge pull request #183 from lucacome/tag-nginx-version
Browse files Browse the repository at this point in the history
Tag Docker image with NGINX version
  • Loading branch information
miry authored Aug 26, 2021
2 parents a5ad2db + 6cef7ff commit 842d21f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

[ -z "${SRC_DIR}" ] && export SRC_DIR="`pwd`"
[ -z "${SRC_DIR}" ] && export SRC_DIR="$(pwd)"
[ -z "${BUILD_DIR}" ] && export BUILD_DIR=/build
[ -z "${MODULE_DIR}" ] && export MODULE_DIR=/modules

Expand All @@ -26,7 +26,7 @@ elif [[ "$1" == "module.binaries" ]]; then
exit 0
elif [[ "$1" == "push_docker_image" ]]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
VERSION_TAG="`git describe --abbrev=0 --tags`"
VERSION_TAG="$(git describe --abbrev=0 --tags)"
VERSION="${VERSION_TAG/v/}"
# nginx
docker build -t opentracing/nginx-opentracing .
Expand All @@ -35,6 +35,10 @@ elif [[ "$1" == "push_docker_image" ]]; then
docker tag opentracing/nginx-opentracing opentracing/nginx-opentracing:latest
docker push opentracing/nginx-opentracing:latest

NGINX_VERSION="$(docker inspect --format '{{json .Config.Env }}' opentracing/nginx-opentracing | awk -F, '{ sub(/^.*NGINX_VERSION=/, ""); print substr($1, 1, length($1)-1)}')"
docker tag opentracing/nginx-opentracing opentracing/nginx-opentracing:nginx-${NGINX_VERSION}
docker push opentracing/nginx-opentracing:nginx-${NGINX_VERSION}

# openresty
docker build -t opentracing/openresty -f Dockerfile-openresty .
docker tag opentracing/openresty opentracing/openresty:${VERSION}
Expand Down

0 comments on commit 842d21f

Please sign in to comment.