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

wip #12066

Closed
wants to merge 4 commits into from
Closed

wip #12066

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
37 changes: 37 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# NB: sematics here are not the same as .gitignore
# see https://github.com/bazelbuild/bazel/issues/8106
# Ignore backup files.
*~
# Ignore Vim swap files.
.*.swp
# Ignore files generated by IDEs.
/.aswb/
/.cache/
/.classpath
/.clwb/
/.factorypath
/.idea/
/.ijwb/
/.project
/.settings
/.vscode/
/bazel.iml
# Ignore all bazel-* symlinks. There is no full list since this can change
# based on the name of the directory bazel is cloned into.
/bazel-*
# Ignore outputs generated during Bazel bootstrapping.
/output/
# Ignore jekyll build output.
/production
/.sass-cache
# Bazelisk version file
.bazelversion
# User-specific .bazelrc
user.bazelrc

/t/
/spec/
/spec-ee/
/servroot/
/autodoc/
/.github/
51 changes: 51 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Bazel doesn't need more than 200MB of memory for local build based on memory profiling:
# https://docs.bazel.build/versions/master/skylark/performance.html#memory-profiling
# The default JVM max heapsize is 1/4 of physical memory up to 32GB which could be large
# enough to consume all memory constrained by cgroup in large host.
# Limiting JVM heapsize here to let it do GC more when approaching the limit to
# leave room for compiler/linker.
# The number 3G is chosen heuristically to both support large VM and small VM with RBE.
# Startup options cannot be selected via config.
startup --host_jvm_args=-Xmx512m

run --color=yes

common --color=yes
common --curses=auto

build --experimental_ui_max_stdouterr_bytes=10485760

build --show_progress_rate_limit=0
build --show_timestamps
build --worker_verbose

build --incompatible_strict_action_env

# Enable --platforms API based cpu,compiler,crosstool_top selection; remove this in 7.0.0 as it's enabled by default
build --incompatible_enable_cc_toolchain_resolution

# Pass PATH, CC, CXX variables from the environment.
build --action_env=CC --host_action_env=CC
build --action_env=CXX --host_action_env=CXX
build --action_env=PATH --host_action_env=PATH

build --action_env=BAZEL_BUILD=1

# temporary fix for https://github.com/bazelbuild/bazel/issues/12905 on macOS
build --features=-debug_prefix_map_pwd_is_dot

# Build flags.
build --action_env=BUILD_NAME=kong-dev
build --action_env=INSTALL_DESTDIR=MANAGED
build --strip=never

# Release flags
build:release --//:debug=false
build:release --action_env=BUILD_NAME=kong-dev
build:release --action_env=INSTALL_DESTDIR=/usr/local
build:release --copt="-g"
build:release --strip=never

build --spawn_strategy=local

build --action_env=GITHUB_TOKEN --host_action_env=GITHUB_TOKEN
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.1.0
38 changes: 29 additions & 9 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ core/db/migrations:
core/db:
- any: ['kong/db/**/*', '!kong/db/migrations/**/*']

changelog:
- CHANGELOG.md

core/docs:
- kong/autodoc/**/*
- ./**/*.md
- ./*.md
- any: ['**/*.md', '!CHANGELOG.md']

autodoc:
- 'autodoc/**/*'

core/language/go:
- kong/runloop/plugin_servers/*
Expand All @@ -49,6 +53,10 @@ core/router:
core/templates:
- kong/templates/*

core/tracing:
- kong/tracing/**/*
- kong/pdk/tracing.lua

chore:
- .github/**/*
- .devcontainer/**/*
Expand Down Expand Up @@ -107,19 +115,14 @@ plugins/key-auth:
plugins/ldap-auth:
- kong/plugins/ldap-auth/**/*

plugins/log-serializers:
- kong/plugins/log-serializers/**/*

plugins/loggly:
- kong/plugins/loggly/**/*

plugins/oauth2:
- kong/plugins/oauth2/**/*

plugins/post-function:
plugins/serverless-functions:
- kong/plugins/post-function/**/*

plugins/pre-function:
- kong/plugins/pre-function/**/*

plugins/prometheus:
Expand Down Expand Up @@ -164,4 +167,21 @@ plugins/udp-log:
plugins/zipkin:
- kong/plugins/zipkin/**/*

plugins/opentelemetry:
- kong/plugins/opentelemetry/**/*

copyright:
- COPYRIGHT

schema-change-noteworthy:
- kong/db/schema/entities/**/*

build/bazel:
- '**/*.bazel'
- '**/*.bzl'
- build/**/*
- WORKSPACE
- .bazelignore
- .bazelrc
- .bazelversion
- scripts/build-*.sh
24 changes: 24 additions & 0 deletions .github/matrix-commitly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# please see matrix-full.yml for meaning of each field
build-packages:
- label: ubuntu-22.04
os: ubuntu-22.04
package: deb
check-manifest-suite: ubuntu-22.04-amd64

build-images:
- label: ubuntu
base-image: ubuntu:22.04
package: deb
artifact-from: ubuntu-22.04

smoke-tests:
- label: ubuntu

scan-vulnerabilities:
- label: ubuntu

release-packages:

release-images:
- label: ubuntu
package: deb
193 changes: 193 additions & 0 deletions .github/matrix-full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
build-packages:
# label: used to distinguish artifacts for later use;
# ensure its value ends with -arm64 if it's a cross-compiled for ARM64 target
# image: docker image name if the build is running in side a container
# package: package type
# package-type: the nfpm packaging target, //:kong_{package} target; only used when package is rpm
# bazel-args: additional bazel build flags
# check-manifest-suite: the check manifest suite as defined in scripts/explain_manifest/config.py

# Ubuntu
- label: ubuntu-18.04
image: ubuntu:18.04
package: deb
check-manifest-suite: ubuntu-18.04-amd64
- label: ubuntu-20.04
image: ubuntu:20.04
package: deb
check-manifest-suite: ubuntu-20.04-amd64
- label: ubuntu-22.04
package: deb
check-manifest-suite: ubuntu-22.04-amd64

# Debian
- label: debian-10
image: debian:10
package: deb
check-manifest-suite: debian-10-amd64
- label: debian-11
image: debian:11
package: deb
check-manifest-suite: debian-11-amd64

# Alpine
- label: alpine
os: ubuntu-22.04
package: apk
bazel-args: --platforms=//:alpine-crossbuild-x86_64 --//:opentracing=true
check-manifest-suite: alpine-amd64

# CentOS
- label: centos-7
os: ubuntu-22.04
image: centos:7
package: rpm
package-type: el7
check-manifest-suite: el7-amd64

# RHEL
- label: rhel-7
image: centos:7
package: rpm
package-type: el7
check-manifest-suite: el7-amd64

- label: rhel-8
image: rockylinux:8
package: rpm
package-type: el8
check-manifest-suite: el8-amd64

# AmazonLinux
- label: amazonlinux-2
image: amazonlinux:2
package: rpm
bazel-args: --//:opentracing=true
package-type: aws2
check-manifest-suite: amazonlinux-2-amd64

build-images:
# Only build images for the latest version of each major release.
# label: used as compose docker image label ${github.sha}-${label}
# base-image: docker image to use as base
# package: package type
# package-distro: the distro name to use in package name, for example el7, aws2; only applicable to rpm
# artifact-from: label of build-packages to use
# artifact-from-alt: another label of build-packages to use for downloading package (to build multi-arch image)
# docker-platforms: comma separated list of docker buildx platforms to build for

# Ubuntu
- label: ubuntu
base-image: ubuntu:22.04
package: deb
artifact-from: ubuntu-22.04

# Centos
- label: centos7
base-image: centos:7
package: rpm
package-distro: el7
artifact-from: centos-7

- label: rhel7
base-image: registry.access.redhat.com/ubi7
package: rpm
package-distro: el7
artifact-from: rhel-7

- label: rhel8
base-image: registry.access.redhat.com/ubi8
package: rpm
package-distro: el8
artifact-from: rhel-8

# Alpine
- label: alpine
base-image: alpine:3.16
package: apk
artifact-from: alpine

release-packages:
# Ubuntu
- label: ubuntu-18.04
package: deb
artifact-from: ubuntu-18.04
artifact-version: 18.04
artifact-type: ubuntu
artifact: kong.all.deb
- label: ubuntu-20.04
package: deb
artifact-from: ubuntu-20.04
artifact-version: 20.04
artifact-type: ubuntu
artifact: kong.all.deb
- label: ubuntu-22.04
package: deb
artifact-from: ubuntu-22.04
artifact-version: 22.04
artifact-type: ubuntu
artifact: kong.all.deb

# Debian
- label: debian-10
package: deb
artifact-from: debian-10
artifact-version: 10
artifact-type: debian
artifact: kong.all.deb
- label: debian-11
package: deb
artifact-from: debian-11
artifact-version: 11
artifact-type: debian
artifact: kong.all.deb

# CentOS
- label: centos-7
package: rpm
artifact-from: centos-7
artifact-version: 7
artifact-type: centos
artifact: kong.el7.all.rpm

# RHEL
- label: rhel-7
package: rpm
artifact-from: rhel-7
artifact-version: 7
artifact-type: rhel
artifact: kong.el7.all.rpm

- label: rhel-8
package: rpm
artifact-from: rhel-8
artifact-version: 8
artifact-type: rhel
artifact: kong.el8.all.rpm

# Amazon Linux
- label: amazonlinux-2
package: rpm
artifact-from: amazonlinux-2
artifact-version: 2
artifact-type: amazonlinux
artifact: kong.aws2.all.rpm

# Alpine
- label: alpine
package: apk
artifact-from: alpine
artifact-type: alpine
artifact: kong.all.apk.tar.gz

release-images:
- label: centos7
package: rpm
- label: rhel7
package: rpm
- label: rhel8
package: rpm
- label: alpine
package: apk
- label: ubuntu
package: deb
12 changes: 0 additions & 12 deletions .github/workflows/auto-assignee.yml

This file was deleted.

Loading