Skip to content

Commit

Permalink
Merge pull request #273 from Kong/chore/pin-nginx-module
Browse files Browse the repository at this point in the history
feat(nginx-module) add the ability to pin the kong nginx module
  • Loading branch information
hutchic authored May 19, 2020
2 parents c8960bb + 0c79bce commit 2f3e118
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RESTY_OPENSSL_VERSION ?= `grep RESTY_OPENSSL_VERSION $(KONG_SOURCE_LOCATION)/.re
RESTY_PCRE_VERSION ?= `grep RESTY_PCRE_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
KONG_GMP_VERSION ?= `grep KONG_GMP_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
KONG_NETTLE_VERSION ?= `grep KONG_NETTLE_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
KONG_NGINX_MODULE ?= `grep KONG_NGINX_MODULE $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
OPENRESTY_PATCHES ?= 1
LIBYAML_VERSION ?= 0.2.3
DOCKER_KONG_VERSION ?= 'master'
Expand Down Expand Up @@ -98,6 +99,7 @@ debug:
@echo ${DOCKER_COMMAND}
@echo ${BUILDX_INFO}
@echo ${DEBUG}
@echo ${KONG_NGINX_MODULE}

setup-ci: setup-build

Expand Down Expand Up @@ -185,6 +187,7 @@ else
--build-arg EDITION=$(EDITION) \
--build-arg KONG_GMP_VERSION=$(KONG_GMP_VERSION) \
--build-arg KONG_NETTLE_VERSION=$(KONG_NETTLE_VERSION) \
--build-arg KONG_NGINX_MODULE=$(KONG_NGINX_MODULE) \
--build-arg OPENRESTY_PATCHES=$(OPENRESTY_PATCHES) \
--build-arg DEBUG=$(DEBUG) \
-t $(DOCKER_REPOSITORY):openresty-$(RESTY_IMAGE_BASE)-$(RESTY_IMAGE_TAG)-$(DOCKER_OPENRESTY_SUFFIX) . )
Expand Down
6 changes: 6 additions & 0 deletions build-openresty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ then
KONG_NGX_BUILD_ARGS="--debug"
fi

if [ -z "$KONG_NGINX_MODULE" ]
then
KONG_NGINX_MODULE="master"
fi

LUAROCKS_PREFIX=/usr/local \
LUAROCKS_DESTDIR=/tmp/build \
OPENRESTY_PREFIX=/usr/local/openresty \
Expand All @@ -47,6 +52,7 @@ EDITION=$EDITION \
--openresty $RESTY_VERSION \
--openssl $RESTY_OPENSSL_VERSION \
--luarocks $RESTY_LUAROCKS_VERSION \
--kong-nginx-module $KONG_NGINX_MODULE \
--pcre $RESTY_PCRE_VERSION \
--work /work $KONG_NGX_BUILD_ARGS >> $BUILD_OUTPUT 2>&1

Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/Dockerfile.openresty
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ RUN if [ "$EDITION" = "enterprise" ] ; then curl -fsSLo /tmp/passwdqc-${KONG_DEP
MANDIR=/usr/local/share/man \
install_lib; fi

ARG KONG_NGINX_MODULE=master

ARG RESTY_VERSION=1.13.6.2
LABEL resty_version="${RESTY_VERSION}"

Expand Down

0 comments on commit 2f3e118

Please sign in to comment.