Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add version 2.8.2.1 #597

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@

---

## Unreleased

* refactor: for updating switch from `hub` to the offical Github `gh` cli command.

---

## 2.11.1 released 30-May-2024

* Fix: if no health-checks are defined for a dependency then assume it to be healthy.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ Pongo repository must be updated.
To do so there are some pre-requisites;
- have [hub](https://hub.github.com/) installed and configured
- have [gh](https://cli.github.com/) installed and configured
- on OSX have [coreutils](https://www.gnu.org/software/coreutils/coreutils.html) installed
- have access to the `kong-pongo` (push) and `kong-ee` (read/clone) repositories on Github
Expand Down
10 changes: 8 additions & 2 deletions assets/add_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Usage:
test: add "test" to make it a test run without pushing updates

This tool will attempt to update Pongo by adding the requested version.

Exitcodes:
- 0: success
- 1: error
- 2: version was already present, and doesn't need adding

EOF
}

Expand Down Expand Up @@ -66,7 +72,7 @@ msg "Version to add: $ADD_VERSION"

if version_exists "$ADD_VERSION"; then
err "Version '$ADD_VERSION' is already available"
exit 1
exit 2
fi

VERSIONS_FILE=${LOCAL_PATH}/assets/kong_${CODE_BASE}_versions.ver
Expand Down Expand Up @@ -143,7 +149,7 @@ else
fi
msg "Now creating a Github pull-request:"
if [[ "$DRY_RUN" == "" ]]; then
hub pull-request --no-edit
gh pr create --fill
if [[ ! $? -eq 0 ]]; then
git checkout "$PREVIOUS_BRANCH" &> /dev/null
git branch -D "$BRANCH_NAME" &> /dev/null
Expand Down
1 change: 1 addition & 0 deletions assets/kong_EE_versions.ver
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

2.8.2.1
2.8.4.2
2.8.4.3
2.8.4.4
Expand Down
305 changes: 305 additions & 0 deletions kong-versions/2.8.2.1/kong/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
OS := $(shell uname | awk '{print tolower($$0)}')
MACHINE := $(shell uname -m)

DEV_ROCKS = "busted 2.0.0" "busted-htest 1.0.0" "luacheck 0.25.0" "lua-llthreads2 0.1.6" "http 0.4" "ldoc 1.4.6"
WIN_SCRIPTS = "bin/busted" "bin/kong"
BUSTED_ARGS ?= -v
TEST_CMD ?= bin/busted $(BUSTED_ARGS)

ifeq ($(OS), darwin)
OPENSSL_DIR ?= /usr/local/opt/openssl
GRPCURL_OS ?= osx
else
OPENSSL_DIR ?= /usr
GRPCURL_OS ?= $(OS)
endif

ifeq ($(MACHINE), aarch64)
GRPCURL_MACHINE ?= arm64
else
GRPCURL_MACHINE ?= $(MACHINE)
endif

.PHONY: install dependencies dev remove grpcurl \
setup-ci setup-kong-build-tools \
lint test test-integration test-plugins test-all \
pdk-phase-check functional-tests \
fix-windows \
nightly-release release

ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
KONG_SOURCE_LOCATION ?= $(ROOT_DIR)
KONG_BUILD_TOOLS_LOCATION ?= $(KONG_SOURCE_LOCATION)/../kong-build-tools
KONG_GMP_VERSION ?= `grep KONG_GMP_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
RESTY_VERSION ?= `grep RESTY_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
RESTY_LUAROCKS_VERSION ?= `grep RESTY_LUAROCKS_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
RESTY_OPENSSL_VERSION ?= `grep RESTY_OPENSSL_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
RESTY_PCRE_VERSION ?= `grep RESTY_PCRE_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
KONG_BUILD_TOOLS ?= `grep KONG_BUILD_TOOLS_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
GRPCURL_VERSION ?= 1.8.5
OPENRESTY_PATCHES_BRANCH ?= master
KONG_NGINX_MODULE_BRANCH ?= master
KONG_PGMOON_VERSION ?= `grep KONG_PGMOON_VERSION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
KONG_PGMOON_LOCATION ?= $(KONG_SOURCE_LOCATION)/../kong-pgmoon

PACKAGE_TYPE ?= deb
REPOSITORY_NAME ?= kong-${PACKAGE_TYPE}
REPOSITORY_OS_NAME ?= ${RESTY_IMAGE_BASE}
KONG_PACKAGE_NAME ?= kong
# This logic should mirror the kong-build-tools equivalent
KONG_VERSION ?= `echo $(KONG_SOURCE_LOCATION)/kong-*.rockspec | sed 's,.*/,,' | cut -d- -f2`

TAG := $(shell git describe --exact-match HEAD || true)

ifneq ($(TAG),)
# We're building a tag
ISTAG = true
POSSIBLE_PRERELEASE_NAME = $(shell git describe --tags --abbrev=0 | awk -F"-" '{print $$2}')
ifneq ($(POSSIBLE_PRERELEASE_NAME),)
# We're building a pre-release tag
OFFICIAL_RELEASE = false
REPOSITORY_NAME = kong-prerelease
else
# We're building a semver release tag
OFFICIAL_RELEASE = true
KONG_VERSION ?= `cat $(KONG_SOURCE_LOCATION)/kong-*.rockspec | grep -m1 tag | awk '{print $$3}' | sed 's/"//g'`
ifeq ($(PACKAGE_TYPE),apk)
REPOSITORY_NAME = kong-alpine-tar
endif
endif
else
OFFICIAL_RELEASE = false
ISTAG = false
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
REPOSITORY_NAME = kong-${BRANCH}
REPOSITORY_OS_NAME = ${BRANCH}
KONG_PACKAGE_NAME ?= kong-${BRANCH}
KONG_VERSION ?= `date +%Y-%m-%d`
endif

release:
ifeq ($(ISTAG),false)
sed -i -e '/return string\.format/,/\"\")/c\return "$(KONG_VERSION)\"' kong/meta.lua
endif
cd $(KONG_BUILD_TOOLS_LOCATION); \
$(MAKE) \
KONG_VERSION=${KONG_VERSION} \
KONG_PACKAGE_NAME=${KONG_PACKAGE_NAME} \
package-kong && \
$(MAKE) \
KONG_VERSION=${KONG_VERSION} \
KONG_PACKAGE_NAME=${KONG_PACKAGE_NAME} \
REPOSITORY_NAME=${REPOSITORY_NAME} \
REPOSITORY_OS_NAME=${REPOSITORY_OS_NAME} \
KONG_PACKAGE_NAME=${KONG_PACKAGE_NAME} \
KONG_VERSION=${KONG_VERSION} \
OFFICIAL_RELEASE=$(OFFICIAL_RELEASE) \
release-kong

setup-ci:
OPENRESTY=$(RESTY_VERSION) \
LUAROCKS=$(RESTY_LUAROCKS_VERSION) \
OPENSSL=$(RESTY_OPENSSL_VERSION) \
OPENRESTY_PATCHES_BRANCH=$(OPENRESTY_PATCHES_BRANCH) \
KONG_NGINX_MODULE_BRANCH=$(KONG_NGINX_MODULE_BRANCH) \
.ci/setup_env.sh

setup-kong-build-tools:
-rm -rf $(KONG_BUILD_TOOLS_LOCATION)
-git clone https://github.com/Kong/kong-build-tools.git $(KONG_BUILD_TOOLS_LOCATION)
cd $(KONG_BUILD_TOOLS_LOCATION); \
git reset --hard && git checkout $(KONG_BUILD_TOOLS); \

functional-tests: setup-kong-build-tools
cd $(KONG_BUILD_TOOLS_LOCATION); \
$(MAKE) setup-build && \
$(MAKE) build-kong && \
$(MAKE) test

install-pgmoon:
-luarocks remove pgmoon --force
-rm -rf $(KONG_PGMOON_LOCATION)
-git clone https://github.com/Kong/pgmoon.git $(KONG_PGMOON_LOCATION)
cd $(KONG_PGMOON_LOCATION); \
git reset --hard $(KONG_PGMOON_VERSION); \
luarocks make --force

install-kong:
@luarocks make OPENSSL_DIR=$(OPENSSL_DIR) CRYPTO_DIR=$(OPENSSL_DIR)

install: install-kong install-pgmoon
cd ./plugins-ee/application-registration; \
luarocks make

remove:
-@luarocks remove kong

remove-plugins-ee:
scripts/enterprise_plugin.sh remove-all

dependencies: bin/grpcurl
@for rock in $(DEV_ROCKS) ; do \
if luarocks list --porcelain $$rock | grep -q "installed" ; then \
echo $$rock already installed, skipping ; \
else \
echo $$rock not found, installing via luarocks... ; \
luarocks install $$rock OPENSSL_DIR=$(OPENSSL_DIR) CRYPTO_DIR=$(OPENSSL_DIR) || exit 1; \
fi \
done;

bin/grpcurl:
@curl -s -S -L \
https://github.com/fullstorydev/grpcurl/releases/download/v$(GRPCURL_VERSION)/grpcurl_$(GRPCURL_VERSION)_$(GRPCURL_OS)_$(GRPCURL_MACHINE).tar.gz | tar xz -C bin;
@rm bin/LICENSE

dev: remove install dependencies

lint:
@luacheck --exclude-files ./plugins-ee/ -q .
@!(grep -R -E -I -n -w '#only|#o' spec && echo "#only or #o tag detected") >&2
@!(grep -R -E -I -n -w '#only|#o' spec-ee && echo "#only or #o tag detected") >&2
@!(grep -R -E -I -n -- '---\s+ONLY' t && echo "--- ONLY block detected") >&2
@$(KONG_SOURCE_LOCATION)/scripts/copyright-header-checker

install-plugins-ee:
scripts/enterprise_plugin.sh install-all

try-install-plugins-ee:
scripts/enterprise_plugin.sh install-all --ignore-errors

test:
@$(TEST_CMD) spec/01-unit

test-ee:
@$(TEST_CMD) spec-ee/01-unit

test-integration:
@$(TEST_CMD) spec/02-integration

test-integration-ee:
@$(TEST_CMD) spec-ee/02-integration

test-plugins-spec:
@$(TEST_CMD) spec/03-plugins

test-plugins-spec-ee:
@$(TEST_CMD) spec-ee/03-plugins

test-all:
@$(TEST_CMD) spec/

test-all-ee:
@$(TEST_CMD) spec-ee/

test-build-package:
$(KONG_SOURCE_LOCATION)/dist/dist.sh build alpine

test-build-image: test-build-package
$(KONG_SOURCE_LOCATION)/dist/dist.sh build-image alpine

test-build-pongo-deps:
scripts/enterprise_plugin.sh build-deps

test-forward-proxy:
scripts/enterprise_plugin.sh test forward-proxy

test-canary:
scripts/enterprise_plugin.sh test canary

test-application-registration:
scripts/enterprise_plugin.sh test application-registration

test-collector:
scripts/enterprise_plugin.sh test collector

test-degraphql:
scripts/enterprise_plugin.sh test degraphql

test-exit-transformer:
scripts/enterprise_plugin.sh test exit-transformer

test-graphql-proxy-cache-advanced:
scripts/enterprise_plugin.sh test graphql-proxy-cache-advanced

test-graphql-rate-limiting-advanced:
scripts/enterprise_plugin.sh test graphql-rate-limiting-advanced

test-jq:
scripts/enterprise_plugin.sh test jq

test-jwt-signer:
scripts/enterprise_plugin.sh test jwt-signer

test-kafka-log:
scripts/enterprise_plugin.sh test kafka-log

test-kafka-upstream:
scripts/enterprise_plugin.sh test kafka-upstream

test-key-auth-enc:
scripts/enterprise_plugin.sh test key-auth-enc

test-ldap-auth-advanced:
scripts/enterprise_plugin.sh test ldap-auth-advanced

test-mocking:
scripts/enterprise_plugin.sh test mocking

test-mtls-auth:
scripts/enterprise_plugin.sh test mtls-auth

test-oauth2-introspection:
scripts/enterprise_plugin.sh test oauth2-introspection

test-opa:
scripts/enterprise_plugin.sh test opa

test-openid-connect:
scripts/enterprise_plugin.sh test openid-connect

test-proxy-cache-advanced:
scripts/enterprise_plugin.sh test proxy-cache-advanced

test-request-transformer-advanced:
scripts/enterprise_plugin.sh test request-transformer-advanced

test-request-validator:
scripts/enterprise_plugin.sh test request-validator

test-response-transformer-advanced:
scripts/enterprise_plugin.sh test response-transformer-advanced

test-route-by-header:
scripts/enterprise_plugin.sh test route-by-header

test-route-transformer-advanced:
scripts/enterprise_plugin.sh test route-transformer-advanced

test-statsd-advanced:
scripts/enterprise_plugin.sh test statsd-advanced

test-upstream-timeout:
scripts/enterprise_plugin.sh test upstream-timeout

test-vault-auth:
scripts/enterprise_plugin.sh test vault-auth

test-rate-limiting-advanced:
scripts/enterprise_plugin.sh test rate-limiting-advanced

pdk-phase-checks:
rm -f t/phase_checks.stats
rm -f t/phase_checks.report
PDK_PHASE_CHECKS_LUACOV=1 prove -I. t/01*/*/00-phase*.t
luacov -c t/phase_checks.luacov
grep "ngx\\." t/phase_checks.report
grep "check_" t/phase_checks.report

fix-windows:
@for script in $(WIN_SCRIPTS) ; do \
echo Converting Windows file $$script ; \
mv $$script $$script.win ; \
tr -d '\015' <$$script.win >$$script ; \
rm $$script.win ; \
chmod 0755 $$script ; \
done;
Loading
Loading