-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci) build nightly releases from jenkins instead of travis-ci (#167
) * chore(ci) [skip travis] move nightly releases to Jenkins * [skip travis] * [skip travis] split plugin tests out and login to docker when building the docker test image * [skip travis] try a different way of defining the KONG_VERSION env * [skip travis] skip the problematic builds * [skip travis] move the daily deploys out of travis.yml * [skip travis] wip debugging a sporadically failing test * fix(tests) adjust how we run the report mock server for a more reliable test * chore(ci) debug the environment variables available in jenkins [skip travis] * chore(ci) set the repository os name environment variable [skip travis] * test(reports) adjust how we check if the report server can run * chore(ci) adjust the jenkins setup [skip travis] * chore(wip) remove the integration tests to focus on getting the nightly releases to work * fix(ci) adjust how set set the bintray credentials [skip travis] * wip -- debugging daily releases to bintray [skip travis] * chore(ci) run only the xenial release [skip travis] * chore(ci) re-enable tests and other distribution releases * chore(ci) add the CI cron trigger chore(dependency) bump the kong-build-tools dependency (#168) chore(dependencies) adjust kong-build-tools dependency pin (#169) * chore(dependency) bump the kong-build-tools dependency * chore(ci) unpin the jenkins build from the kong-build-tools branch chore(nightly) build nightly arm release (#171) chore(ci) adjust cache settings for xenail nightly builds (#173)
- Loading branch information
Showing
4 changed files
with
250 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
pipeline { | ||
agent none | ||
environment{ | ||
UPDATE_CACHE = "true" | ||
DOCKER_CREDENTIALS = credentials('dockerhub') | ||
DOCKER_USERNAME = "${env.DOCKER_CREDENTIALS_USR}" | ||
DOCKER_PASSWORD = "${env.DOCKER_CREDENTIALS_PSW}" | ||
KONG_PACKAGE_NAME = 'kong' | ||
REPOSITORY_OS_NAME = "${env.BRANCH_NAME}" | ||
} | ||
triggers { | ||
cron('@daily') | ||
} | ||
stages { | ||
stage('Build Kong') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
environment { | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
sh 'echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin || true' | ||
dir('../kong-build-tools') { sh 'make kong-test-container' } | ||
} | ||
} | ||
stage('Integration Tests') { | ||
parallel { | ||
stage('dbless') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
environment { | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
TEST_DATABASE = "off" | ||
TEST_SUITE = "dbless" | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
dir('../kong-build-tools'){ | ||
sh 'make test-kong' | ||
} | ||
} | ||
} | ||
stage('postgres') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
environment { | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
TEST_DATABASE = 'postgres' | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
dir('../kong-build-tools'){ | ||
sh 'make test-kong' | ||
} | ||
} | ||
} | ||
stage('postgres plugins') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
environment { | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
TEST_DATABASE = 'postgres' | ||
TEST_SUITE = 'plugins' | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
dir('../kong-build-tools'){ | ||
sh 'make test-kong' | ||
} | ||
} | ||
} | ||
stage('cassandra') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
environment { | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
TEST_DATABASE = 'cassandra' | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
dir('../kong-build-tools'){ | ||
sh 'make test-kong' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('Nightly Releases') { | ||
when { | ||
allOf { | ||
triggeredBy 'TimerTrigger' | ||
anyOf { branch 'master'; branch 'next' } | ||
} | ||
} | ||
parallel { | ||
stage('Ubuntu Xenial Release') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
options { | ||
retry(2) | ||
} | ||
environment { | ||
PACKAGE_TYPE = 'deb' | ||
RESTY_IMAGE_BASE = 'ubuntu' | ||
RESTY_IMAGE_TAG = 'xenial' | ||
CACHE = 'false' | ||
UPDATE_CACHE = 'true' | ||
USER = 'travis' | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
BINTRAY_USR = 'kong-inc_travis-ci@kong' | ||
BINTRAY_KEY = credentials('bintray_travis_key') | ||
AWS_ACCESS_KEY = credentials('AWS_ACCESS_KEY') | ||
AWS_SECRET_ACCESS_KEY = credentials('AWS_SECRET_ACCESS_KEY') | ||
DOCKER_MACHINE_ARM64_NAME = "jenkins-kong-${env.BUILD_NUMBER}" | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
sh 'mkdir -p $HOME/bin' | ||
sh 'sudo ln -s $HOME/bin/kubectl /usr/local/bin/kubectl' | ||
sh 'sudo ln -s $HOME/bin/kind /usr/local/bin/kind' | ||
dir('../kong-build-tools'){ sh 'make setup-ci' } | ||
sh 'REPOSITORY_NAME=`basename ${GIT_URL%.*}`-nightly KONG_VERSION=`date +%Y-%m-%d` make nightly-release' | ||
} | ||
post { | ||
always { | ||
dir('../kong-build-tools'){ sh 'make cleanup_build' } | ||
} | ||
} | ||
} | ||
stage('Ubuntu Releases') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
environment { | ||
PACKAGE_TYPE = 'deb' | ||
RESTY_IMAGE_BASE = 'ubuntu' | ||
RESTY_IMAGE_TAG = 'xenial' | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
BINTRAY_USR = 'kong-inc_travis-ci@kong' | ||
BINTRAY_KEY = credentials('bintray_travis_key') | ||
DOCKER_MACHINE_ARM64_NAME = "jenkins-kong-${env.BUILD_NUMBER}" | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
sh 'mkdir -p $HOME/bin' | ||
sh 'sudo ln -s $HOME/bin/kubectl /usr/local/bin/kubectl' | ||
sh 'sudo ln -s $HOME/bin/kind /usr/local/bin/kind' | ||
dir('../kong-build-tools'){ sh 'make setup-ci' } | ||
sh 'REPOSITORY_NAME=`basename ${GIT_URL%.*}`-nightly KONG_VERSION=`date +%Y-%m-%d` RESTY_IMAGE_TAG=trusty BUILDX=false make nightly-release' | ||
sh 'REPOSITORY_NAME=`basename ${GIT_URL%.*}`-nightly KONG_VERSION=`date +%Y-%m-%d` RESTY_IMAGE_TAG=bionic BUILDX=false make nightly-release' | ||
} | ||
} | ||
stage('Centos Releases') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
environment { | ||
PACKAGE_TYPE = 'rpm' | ||
RESTY_IMAGE_BASE = 'centos' | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
REDHAT_CREDENTIALS = credentials('redhat') | ||
REDHAT_USERNAME = "${env.REDHAT_USR}" | ||
REDHAT_PASSWORD = "${env.REDHAT_PSW}" | ||
BINTRAY_USR = 'kong-inc_travis-ci@kong' | ||
BINTRAY_KEY = credentials('bintray_travis_key') | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
sh 'mkdir -p $HOME/bin' | ||
sh 'sudo ln -s $HOME/bin/kubectl /usr/local/bin/kubectl' | ||
sh 'sudo ln -s $HOME/bin/kind /usr/local/bin/kind' | ||
dir('../kong-build-tools'){ sh 'make setup-ci' } | ||
sh 'REPOSITORY_NAME=`basename ${GIT_URL%.*}`-nightly KONG_VERSION=`date +%Y-%m-%d` RESTY_IMAGE_TAG=6 make nightly-release' | ||
sh 'REPOSITORY_NAME=`basename ${GIT_URL%.*}`-nightly KONG_VERSION=`date +%Y-%m-%d` RESTY_IMAGE_TAG=7 make nightly-release' | ||
} | ||
} | ||
stage('Debian Releases') { | ||
agent { | ||
node { | ||
label 'docker-compose' | ||
} | ||
} | ||
environment { | ||
PACKAGE_TYPE = 'deb' | ||
RESTY_IMAGE_BASE = 'debian' | ||
KONG_SOURCE_LOCATION = "${env.WORKSPACE}" | ||
KONG_BUILD_TOOLS_LOCATION = "${env.WORKSPACE}/../kong-build-tools" | ||
BINTRAY_USR = 'kong-inc_travis-ci@kong' | ||
BINTRAY_KEY = credentials('bintray_travis_key') | ||
} | ||
steps { | ||
sh 'make setup-kong-build-tools' | ||
sh 'mkdir -p $HOME/bin' | ||
sh 'sudo ln -s $HOME/bin/kubectl /usr/local/bin/kubectl' | ||
sh 'sudo ln -s $HOME/bin/kind /usr/local/bin/kind' | ||
dir('../kong-build-tools'){ sh 'make setup-ci' } | ||
sh 'REPOSITORY_NAME=`basename ${GIT_URL%.*}`-nightly KONG_VERSION=`date +%Y-%m-%d` RESTY_IMAGE_TAG=jessie make nightly-release' | ||
sh 'REPOSITORY_NAME=`basename ${GIT_URL%.*}`-nightly KONG_VERSION=`date +%Y-%m-%d` RESTY_IMAGE_TAG=stretch make nightly-release' | ||
sh 'REPOSITORY_NAME=`basename ${GIT_URL%.*}`-nightly KONG_VERSION=`date +%Y-%m-%d` RESTY_IMAGE_TAG=buster make nightly-release' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters