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

Baseline is JDK 11 and jetty 11 #452

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e55011e
Enforced Java 11 in build.gradle
azagniotov Jan 7, 2022
29f3159
Removed JDK 8 ALPN dependency decision tree
azagniotov Jan 7, 2022
8c9966b
Removed useNativeJdkAlpnProcessor & use_native_jdk_alpn_processor
azagniotov Jan 7, 2022
a876caa
Cleaned up CircleCI config from JDK 8
azagniotov Jan 7, 2022
14b5faa
Cleaned up Docker related JDK 8/JRE 8 areas
azagniotov Jan 7, 2022
e458435
Upgraded jetty and friends to v11.0.7
azagniotov Jan 7, 2022
a5adcfc
Replaced 'javax.*' packages with 'jakarta.*'
azagniotov Jan 7, 2022
5760261
Fixed compiler errors in production code
azagniotov Jan 7, 2022
ad87362
Fixed compiler errors in unit test code
azagniotov Jan 7, 2022
6b06edf
Fixed compiler errors in functional test code
azagniotov Jan 7, 2022
db96044
Using Frame type from 'api' package, not 'core'
azagniotov Jan 7, 2022
7990332
Fixed sub-protocols setup in tests and read only ByteBuffer payload
azagniotov Jan 7, 2022
30301a0
Test code duplication clean up
azagniotov Jan 7, 2022
dfda9ae
Not using deprecated jetty.util.log.Log classes
azagniotov Jan 7, 2022
02411fa
Added more descriptive error message to smoke tests
azagniotov Jan 7, 2022
19626ae
Delete redundant and obsolete class
azagniotov Jan 7, 2022
b7712ab
Making sure that log4j is on the classpath when building for smoke tests
azagniotov Jan 7, 2022
4693ab7
Removed --mute
azagniotov Jan 7, 2022
6fd3aaa
log4j and slf4j
azagniotov Jan 7, 2022
053a5a7
log4j with DEBUG for jetty packages
azagniotov Jan 7, 2022
aabe8a5
Fixed a self-inflicted bug where 'echo' protocal value was hardcoded …
azagniotov Jan 7, 2022
cc40c92
Removed log4j config file from web sockets smoke test
azagniotov Jan 7, 2022
a2fa729
Not building JAR with log4j on CircleCI
azagniotov Jan 7, 2022
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
215 changes: 21 additions & 194 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,6 @@ docker_in_docker_environment: &docker_in_docker_environment
###########################################################################################
### START: Different JDK images
###########################################################################################
openjdk_alpine_jdk_8u092_environment: &openjdk_alpine_jdk_8u092_environment
<<: *base_environment
docker:
# https://www.oracle.com/java/technologies/javase/8u92-relnotes.html
- image: openjdk:8u92-jdk-alpine@sha256:63eb1c79f609dbaa2c587ba3eb772e8e453229ce91fffc378725ca16435348e9

openjdk_alpine_jdk_8u111_environment: &openjdk_alpine_jdk_8u111_environment
<<: *base_environment
docker:
# https://www.oracle.com/java/technologies/javase/8u111-relnotes.html
- image: openjdk:8u111-jdk-alpine@sha256:d49bf8c44670834d3dade17f8b84d709e7db47f1887f671a0e098bafa9bae49f

azul_zulu_openjdk_alpine_jdk_8u232_environment: &azul_zulu_openjdk_alpine_jdk_8u232_environment
<<: *base_environment
docker:
- image: azul/zulu-openjdk-alpine:8u232@sha256:b0c2420393353be6aaeb77e4498271f46edc5c3dbc39957482f3ef6828628f53

adoptopenjdk_openjdk_alpine_jdk_8u312_b07_environment: &adoptopenjdk_openjdk_alpine_jdk_8u312_b07_environment
<<: *base_environment
docker:
- image: adoptopenjdk/openjdk8:jdk8u312-b07-alpine-slim@sha256:da6bb7b3d1bc1a23653c60f88902be9ca15b4a62f537970d37b65dd374be3221

adoptopenjdk_openjdk_alpine_jdk_11_0_13_8_openj9_environment: &adoptopenjdk_openjdk_alpine_jdk_11_0_13_8_openj9_environment
<<: *base_environment
docker:
Expand All @@ -82,16 +60,10 @@ openjdk_alpine_jdk_17_environment: &openjdk_alpine_jdk_17_environment
###########################################################################################
### END: Different JDK images
###########################################################################################

circleci_pre_built_openjdk_8_environment: &circleci_pre_built_openjdk_8_environment
circleci_pre_built_openjdk_11_environment: &circleci_pre_built_openjdk_11_environment
<<: *base_environment
docker:
- image: circleci/openjdk:8u292-jdk@sha256:51d82605e7f89fc74437dce7324a33e6a7c9d1941ec8cfd0980f6814d78ae494

gradle_7_2_0_jdk8_environment: &gradle_7_2_0_jdk8_environment
<<: *base_environment
docker:
- image: gradle:7.2.0-jdk8-openj9@sha256:d4128edf5ac579f93e3149a9f89be3af779de1d3d85a9f25f25cb3d4b432b69a
- image: circleci/openjdk:11.0.11-9-jdk-buster@sha256:fd85ea86890cd29be510bdb2ad5e09eb494750d16bd3eeac19dabae03ed36b45


gradle_7_2_0_jdk11_environment: &gradle_7_2_0_jdk11_environment
Expand Down Expand Up @@ -199,7 +171,7 @@ default_steps: &default_steps

- run:
name: Run all test suits
command: gradle -PciRun << parameters.use_native_jdk_alpn_processor >> clean test integrationTest functionalTest
command: gradle -PciRun clean test integrationTest functionalTest
when: always

- when:
Expand Down Expand Up @@ -244,7 +216,7 @@ code_coverage_steps: &code_coverage_steps
- run:
name: Run JaCoCo plugin code coverage
when: on_success
command: ./gradlew -PciRun << parameters.use_native_jdk_alpn_processor >> clean jacocoTestReport
command: ./gradlew -PciRun clean jacocoTestReport

- run:
name: Upload code coverage data to Codecov
Expand Down Expand Up @@ -298,8 +270,8 @@ smoke_test_steps: &smoke_test_steps
websocat --version

- run:
name: Build stubby4j uber JAR
command: ./gradlew -PciRun << parameters.use_native_jdk_alpn_processor >> clean build
name: Build stubby4j uber JAR with log4j on the classpath
command: ./gradlew -PciRun clean build

- run:
when: on_success
Expand Down Expand Up @@ -378,10 +350,9 @@ smoke_test_steps: &smoke_test_steps
java -version
echo ""
java -jar build/libs/stubby4j-*.jar \
--location 127.0.0.1 \
--tls 7445 \
--mute \
--data src/smoke-test/yaml/smoke-tests-stubs.yaml &
--location 127.0.0.1 \
--tls 7445 \
--data src/smoke-test/yaml/smoke-tests-stubs.yaml &

STUBBY4J_HTTP_1_PID=$!

Expand All @@ -402,76 +373,11 @@ smoke_test_steps: &smoke_test_steps
#############################################################################################
jobs:

# https://www.oracle.com/java/technologies/javase/8u92-relnotes.html
smoke_openjdk_openjdk_8u092:
parameters:
tls_13:
type: string
default: "no"
use_native_jdk_alpn_processor:
type: string
default: ""
run_tls_with_alpn_http_2_tests:
type: string
default: "no"
<<: *openjdk_alpine_jdk_8u092_environment
<<: *smoke_test_steps


# https://www.oracle.com/java/technologies/javase/8u111-relnotes.html
smoke_openjdk_openjdk_8u111:
parameters:
tls_13:
type: string
default: "no"
use_native_jdk_alpn_processor:
type: string
default: ""
run_tls_with_alpn_http_2_tests:
type: string
default: "no"
<<: *openjdk_alpine_jdk_8u111_environment
<<: *smoke_test_steps


smoke_azul_zulu_openjdk_8u232:
parameters:
tls_13:
type: string
default: "no" # https://github.com/openjsse/openjsse/issues/13
use_native_jdk_alpn_processor:
type: string
default: ""
run_tls_with_alpn_http_2_tests:
type: string
default: "no"
<<: *azul_zulu_openjdk_alpine_jdk_8u232_environment
<<: *smoke_test_steps


smoke_adoptopenjdk_openjdk_8u312_b07:
parameters:
tls_13:
type: string
default: "yes"
use_native_jdk_alpn_processor:
type: string
default: ""
run_tls_with_alpn_http_2_tests:
type: string
default: "yes"
<<: *adoptopenjdk_openjdk_alpine_jdk_8u312_b07_environment
<<: *smoke_test_steps


smoke_adoptopenjdk_openjdk_11_openj9:
parameters:
tls_13:
type: string
default: "yes"
use_native_jdk_alpn_processor:
type: string
default: "-PuseNativeJdkAlpnProcessor"
run_tls_with_alpn_http_2_tests:
type: string
default: "yes"
Expand All @@ -484,9 +390,6 @@ jobs:
tls_13:
type: string
default: "yes"
use_native_jdk_alpn_processor:
type: string
default: "-PuseNativeJdkAlpnProcessor"
run_tls_with_alpn_http_2_tests:
type: string
default: "yes"
Expand All @@ -499,9 +402,6 @@ jobs:
tls_13:
type: string
default: "yes"
use_native_jdk_alpn_processor:
type: string
default: "-PuseNativeJdkAlpnProcessor"
run_tls_with_alpn_http_2_tests:
type: string
default: "yes"
Expand All @@ -514,61 +414,28 @@ jobs:
tls_13:
type: string
default: "yes"
use_native_jdk_alpn_processor:
type: string
default: "-PuseNativeJdkAlpnProcessor"
run_tls_with_alpn_http_2_tests:
type: string
default: "yes"
<<: *openjdk_alpine_jdk_17_environment
<<: *smoke_test_steps


gradle_7_2_0_jdk8:
parameters:
use_native_jdk_alpn_processor:
type: string
default: ""
<<: *gradle_7_2_0_jdk8_environment
gradle_7_2_0_jdk11:
<<: *gradle_7_2_0_jdk11_environment
<<: *default_steps


gradle_7_2_0_jdk8_code_coverage:
parameters:
use_native_jdk_alpn_processor:
type: string
default: ""
<<: *circleci_pre_built_openjdk_8_environment
gradle_7_2_0_jdk11_code_coverage:
<<: *circleci_pre_built_openjdk_11_environment
<<: *code_coverage_steps


gradle_7_2_0_jdk11:
parameters:
use_native_jdk_alpn_processor:
type: string
default: "-PuseNativeJdkAlpnProcessor"
<<: *gradle_7_2_0_jdk11_environment
<<: *default_steps


gradle_7_2_0_jdk16:
parameters:
use_native_jdk_alpn_processor:
type: string
default: "-PuseNativeJdkAlpnProcessor"
<<: *gradle_7_2_0_jdk16_environment
<<: *default_steps


docker_build_latest_jre8:
parameters:
jdk_version:
type: string
default: "8"
<<: *docker_in_docker_environment
<<: *build_push_image_steps


docker_build_latest_jre11:
parameters:
jdk_version:
Expand All @@ -594,29 +461,20 @@ jobs:
version: 2.1
workflows:

master-jdk8-code-coverage:
master-jdk11-code-coverage:
jobs:
- gradle_7_2_0_jdk8_code_coverage:
- gradle_7_2_0_jdk11_code_coverage:
<<: *context_sonatype
<<: *filter_only_master

master-jdk8-publish-snapshot:
master-jdk11-publish-snapshot:
jobs:
- gradle_7_2_0_jdk8:
- gradle_7_2_0_jdk11:
<<: *context_sonatype
<<: *filter_only_master


branch-smoke-test:
jobs:
- smoke_openjdk_openjdk_8u092:
<<: *filter_ignore_master
- smoke_openjdk_openjdk_8u111:
<<: *filter_ignore_master
- smoke_azul_zulu_openjdk_8u232:
<<: *filter_ignore_master
- smoke_adoptopenjdk_openjdk_8u312_b07:
<<: *filter_ignore_master
- smoke_adoptopenjdk_openjdk_11_openj9:
<<: *filter_ignore_master
- smoke_azul_zulu_openjdk_15:
Expand All @@ -628,14 +486,6 @@ workflows:

master-smoke-test:
jobs:
- smoke_openjdk_openjdk_8u092:
<<: *filter_only_master
- smoke_openjdk_openjdk_8u111:
<<: *filter_only_master
- smoke_azul_zulu_openjdk_8u232:
<<: *filter_only_master
- smoke_adoptopenjdk_openjdk_8u312_b07:
<<: *filter_only_master
- smoke_adoptopenjdk_openjdk_11_openj9:
<<: *filter_only_master
- smoke_azul_zulu_openjdk_15:
Expand All @@ -645,20 +495,15 @@ workflows:
- smoke_openjdk_openjdk_17:
<<: *filter_only_master

branch-jdk8:
jobs:
- gradle_7_2_0_jdk8:
<<: *filter_ignore_master
- gradle_7_2_0_jdk8_code_coverage:
<<: *filter_ignore_master
requires:
- gradle_7_2_0_jdk8


branch-jdk11:
jobs:
- gradle_7_2_0_jdk11:
<<: *filter_ignore_master
- gradle_7_2_0_jdk11_code_coverage:
<<: *filter_ignore_master
requires:
- gradle_7_2_0_jdk11


branch-jdk16:
Expand All @@ -673,30 +518,12 @@ workflows:
cron: "5 7,19 * * *"
<<: *filter_only_master
jobs:
- smoke_openjdk_openjdk_8u092
- smoke_openjdk_openjdk_8u111
- smoke_azul_zulu_openjdk_8u232
- smoke_adoptopenjdk_openjdk_8u312_b07
- smoke_adoptopenjdk_openjdk_11_openj9
- smoke_azul_zulu_openjdk_15
- smoke_adoptopenjdk_openjdk_16_openj9
- smoke_openjdk_openjdk_17


master-twelve-hour-jdk8:
triggers:
- schedule:
cron: "10 7,19 * * *"
<<: *filter_only_master
jobs:
- gradle_7_2_0_jdk8:
<<: *context_sonatype
- docker_build_latest_jre8:
<<: *context_docker_hub
requires:
- gradle_7_2_0_jdk8


master-twelve-hour-jdk11:
triggers:
- schedule:
Expand Down
11 changes: 5 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ apply plugin: "org.unbroken-dome.test-sets"
defaultTasks 'clean', 'test', 'integrationTest', 'functionalTest', 'build'
description = 'Gradle configuration for stubby4j'

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters' << '-Xlint:deprecation'
Expand All @@ -35,12 +40,6 @@ compileTestJava {
options.encoding = 'UTF-8'
}

javadoc {
if (JavaVersion.current().isJava8Compatible()) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}

repositories {
mavenLocal()
mavenCentral()
Expand Down
Loading