Circleci config cleanup (DataDog/dd-trace-java#1564)
MODIFY
.circleci/config.yml
.circleci/config.yml
@@ -13,7 +13,11 @@ cache_keys: &cache_keys
# Rev the version when the cache gets too big
- trace-java-v1-{{ .Branch }}-{{ .Revision }}
- trace-java-v1-{{ .Branch }}
- # - dd-trace-java-v1-
+
+parameters:
+ gradle_flags:
+ type: string
+ default: "--build-cache --parallel --stacktrace --no-daemon"
jobs:
build:
@@ -27,7 +31,11 @@ jobs:
- run:
name: Build Project
- command: GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1G -Xms64M' -Dota.forkedMaxHeapSize=1G -Dota.forkedMinHeapSize=64M" ./gradlew clean classes testClasses :opentelemetry-auto:shadowJar :auto-exporters:shadowJar --build-cache --parallel --stacktrace --no-daemon --max-workers=8
+ command: >-
+ GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1G -Xms64M' -Dota.forkedMaxHeapSize=1G -Dota.forkedMinHeapSize=64M"
+ ./gradlew clean classes testClasses :opentelemetry-auto:shadowJar :auto-exporters:shadowJar
+ << pipeline.parameters.gradle_flags >>
+ --max-workers=8
- run:
name: Collect Libs
@@ -60,6 +68,13 @@ jobs:
# This is used by rabbitmq instrumentation tests
- image: rabbitmq
+ parameters:
+ testTask:
+ type: string
+ prefixTestTask:
+ default: false
+ type: boolean
+
steps:
- checkout
@@ -71,7 +86,11 @@ jobs:
- run:
name: Run Tests
- command: GRADLE_OPTS="-Dota.forkedMaxHeapSize=4G -Dota.forkedMinHeapSize=64M" ./gradlew $TEST_TASK --build-cache --parallel --stacktrace --no-daemon --max-workers=6
+ command: >-
+ GRADLE_OPTS="-Dota.forkedMaxHeapSize=4G -Dota.forkedMinHeapSize=64M"
+ ./gradlew <<# parameters.prefixTestTask>>testJava<</ parameters.prefixTestTask>><< parameters.testTask >>
+ << pipeline.parameters.gradle_flags >>
+ --max-workers=6
- run:
name: Collect Reports
@@ -89,66 +108,6 @@ jobs:
- store_test_results:
path: ./results
- test_7:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJava7
-
- test_8:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJava8
-
- test_latest:
- <<: *default_test_job
- environment:
- - TEST_TASK: latestDepTest
-
- test_ibm8:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJavaIBM8
-
- test_zulu8:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJavaZULU8
-
- test_11:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJava11 jacocoTestReport jacocoTestCoverageVerification
-
- test_zulu11:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJavaZULU11
-
- test_12:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJava12
-
- test_13:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJava13
-
- test_zulu13:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJavaZULU13
-
- test_14:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJava14
-
- test_zulu14:
- <<: *default_test_job
- environment:
- - TEST_TASK: testJavaZULU14
-
check:
<<: *defaults
@@ -163,7 +122,11 @@ jobs:
- run:
name: Build Project
- command: GRADLE_OPTS="-Dota.forkedMaxHeapSize=4G -Dota.forkedMinHeapSize=64M" ./gradlew build -PskipTests --build-cache --parallel --stacktrace --no-daemon --max-workers=8
+ command: >-
+ GRADLE_OPTS="-Dota.forkedMaxHeapSize=4G -Dota.forkedMinHeapSize=64M"
+ ./gradlew build -PskipTests
+ << pipeline.parameters.gradle_flags >>
+ --max-workers=8
- run:
name: Collect Reports
@@ -246,40 +209,39 @@ jobs:
workflows:
- version: 2
build_test_deploy:
jobs:
- build:
filters:
tags:
only: /.*/
- - test_7:
- requires:
- - build
- filters:
- tags:
- only: /.*/
- - test_8:
- requires:
- - build
- filters:
- tags:
- only: /.*/
- - test_latest:
+
+ - default_test_job:
requires:
- build
+ prefixTestTask: true
+ name: test_<< matrix.testTask >>
+ matrix:
+ parameters:
+ testTask: ["7", "8", "14"]
filters:
tags:
only: /.*/
- - test_11:
+
+ - default_test_job:
requires:
- build
+ name: test_11
+ testTask: test jacocoTestReport jacocoTestCoverageVerification
filters:
tags:
only: /.*/
- - test_14:
+
+ - default_test_job:
requires:
- build
+ name: test_latest
+ testTask: latestDepTest
filters:
tags:
only: /.*/
@@ -298,20 +260,6 @@ workflows:
branches:
ignore: master
- - publish_master:
- requires:
- - test_7
- - test_8
- - test_latest
- - test_11
- - test_14
- - check
- filters:
- branches:
- only: master
- tags:
- ignore: /.*/
-
nightly_snapshot:
triggers:
- schedule:
@@ -321,7 +269,10 @@ workflows:
only:
- depends-on-otel-java-snapshot
jobs:
- - test_11
+ - default_test_job:
+ name: test_8
+ testTask: test jacocoTestReport jacocoTestCoverageVerification
+
release:
jobs:
- release:
@@ -331,53 +282,65 @@ workflows:
tags:
# Only for major and minor releases
only: /^v.*\.0$/
+
patch_release:
jobs:
- build:
filters:
branches:
only: /\d+\.\d+\.x$/
- - test_7:
- filters:
- branches:
- only: /\d+\.\d+\.x$/
+
+ - default_test_job:
requires:
- build
- - test_8:
+ prefixTestTask: true
+ name: test_<< matrix.testTask >>
+ matrix:
+ parameters:
+ testTask: ["7", "8", "14"]
filters:
branches:
only: /\d+\.\d+\.x$/
+
+ - default_test_job:
requires:
- build
- - test_11:
+ name: test_11
+ testTask: test jacocoTestReport jacocoTestCoverageVerification
filters:
branches:
only: /\d+\.\d+\.x$/
+
+ - default_test_job:
requires:
- build
- - test_14:
+ name: test_latest
+ testTask: latestDepTest
filters:
branches:
only: /\d+\.\d+\.x$/
+
+ - check:
requires:
- build
- - check:
filters:
branches:
only: /\d+\.\d+\.x$/
+
+ - muzzle:
requires:
- build
- - muzzle:
filters:
branches:
only: /\d+\.\d+\.x$/
- requires:
- - build
+
- patch_release:
requires:
- test_7
+ - test_8
- test_11
- test_14
+ - test_latest
- check
- muzzle
filters:

Circleci config cleanup (DataDog/dd-trace-java#1564)