Skip to content

Commit

Permalink
feat(releases): add capability of doing ee internal releases (#469)
Browse files Browse the repository at this point in the history
* feat(releases): add capability of doing ee internal releases

* fix(releases): internal releases are a EE concept only

* fix(ci): retry

* Update release-kong.sh

Co-authored-by: Enrique García Cota <kikito@gmail.com>

Co-authored-by: Enrique García Cota <kikito@gmail.com>
  • Loading branch information
hutchic and kikito authored May 19, 2022
1 parent d6ec82b commit 989086f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pipeline {
DEBUG = 0
}
options {
retry(1)
retry(2)
timeout(time: 120, unit: 'MINUTES')
}
stages {
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ EDITION?=`grep EDITION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print
KONG_LICENSE?="ASL 2.0"

KONG_PACKAGE_NAME ?= `grep KONG_PACKAGE_NAME $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
OFFICIAL_RELEASE ?= true

PACKAGE_CONFLICTS ?= `grep PACKAGE_CONFLICTS $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
PACKAGE_PROVIDES ?= `grep PACKAGE_PROVIDES $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'`
Expand Down Expand Up @@ -128,6 +129,10 @@ debug:
@echo ${KONG_NGINX_MODULE}
@echo ${RESTY_LMDB}
@echo ${RESTY_WEBSOCKET}
@echo ${KONG_VERSION}
@echo ${KONG_PACKAGE_NAME}
@echo ${OFFICIAL_RELEASE}


setup-ci: setup-build

Expand Down Expand Up @@ -301,6 +306,7 @@ release-kong: test
DOCKER_RELEASE_REPOSITORY=$(DOCKER_RELEASE_REPOSITORY) \
DOCKER_LABEL_CREATED=`date -u +'%Y-%m-%dT%H:%M:%SZ'` \
DOCKER_LABEL_REVISION=$(KONG_SHA) \
OFFICIAL_RELEASE=$(OFFICIAL_RELEASE) \
./release-kong.sh
ifeq ($(BUILDX),true)
@DOCKER_MACHINE_NAME=$(shell docker-machine env $(DOCKER_MACHINE_ARM64_NAME) | grep 'DOCKER_MACHINE_NAME=".*"' | cut -d\" -f2) \
Expand All @@ -321,6 +327,7 @@ ifeq ($(BUILDX),true)
RELEASE_DOCKER_ONLY=$(RELEASE_DOCKER_ONLY) \
DOCKER_LABEL_CREATED=`date -u +'%Y-%m-%dT%H:%M:%SZ'` \
DOCKER_LABEL_REVISION=$(KONG_SHA) \
OFFICIAL_RELEASE=$(OFFICIAL_RELEASE) \
./release-kong.sh
endif

Expand Down
10 changes: 9 additions & 1 deletion release-kong.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,17 @@ function push_package() {

set -x

local release_args="--package-type gateway --publish"
local release_args="--package-type gateway"
if [[ "$EDITION" == "enterprise" ]]; then
release_args="$release_args --enterprise"
# enterprise pre-releases go to `/internal/`
if [[ "$OFFICIAL_RELEASE" == "true" ]]; then
release_args="$release_args --publish"
else
release_args="$release_args --internal"
fi
else
release_args="$release_args --publish"
fi

eval $(docker-machine env -u) # release-scripts do not need to run within the arm64 box
Expand Down

0 comments on commit 989086f

Please sign in to comment.