Change circleci config to version 2.1
This commit is contained in:
parent
a1fdfa51a6
commit
d45682427b
|
@ -1,246 +1,246 @@
|
||||||
version: 2
|
version: 2.1
|
||||||
|
|
||||||
defaults: &defaults
|
defaults: &defaults
|
||||||
working_directory: ~/dd-trace-java
|
working_directory: ~/dd-trace-java
|
||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
docker:
|
docker:
|
||||||
- image: &default_container datadog/dd-trace-java-docker-build:latest
|
- image: &default_container datadog/dd-trace-java-docker-build:latest
|
||||||
|
|
||||||
cache_keys: &cache_keys
|
cache_keys: &cache_keys
|
||||||
# Reset the cache approx every release
|
# Reset the cache approx every release
|
||||||
keys:
|
keys:
|
||||||
- dd-trace-java-{{ checksum "dd-trace-java.gradle" }}-{{ .Branch }}-{{ .Revision }}
|
- dd-trace-java-{{ checksum "dd-trace-java.gradle" }}-{{ .Branch }}-{{ .Revision }}
|
||||||
- dd-trace-java-{{ checksum "dd-trace-java.gradle" }}-{{ .Branch }}
|
- dd-trace-java-{{ checksum "dd-trace-java.gradle" }}-{{ .Branch }}
|
||||||
- dd-trace-java-{{ checksum "dd-trace-java.gradle" }}
|
- dd-trace-java-{{ checksum "dd-trace-java.gradle" }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
<<: *cache_keys
|
<<: *cache_keys
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Build Project
|
name: Build Project
|
||||||
command: GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1G -Xms64M' -Ddatadog.forkedMaxHeapSize=1G -Ddatadog.forkedMinHeapSize=64M" ./gradlew clean :dd-java-agent:shadowJar compileTestGroovy compileLatestDepTestGroovy compileTestScala compileLatestDepTestScala compileTestJava compileLatestDepTestJava --build-cache --parallel --stacktrace --no-daemon --max-workers=8
|
command: GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1G -Xms64M' -Ddatadog.forkedMaxHeapSize=1G -Ddatadog.forkedMinHeapSize=64M" ./gradlew clean :dd-java-agent:shadowJar compileTestGroovy compileLatestDepTestGroovy compileTestScala compileLatestDepTestScala compileTestJava compileLatestDepTestJava --build-cache --parallel --stacktrace --no-daemon --max-workers=8
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Collect Libs
|
name: Collect Libs
|
||||||
when: always
|
when: always
|
||||||
command: .circleci/collect_libs.sh
|
command: .circleci/collect_libs.sh
|
||||||
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: ./libs
|
path: ./libs
|
||||||
|
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: .
|
root: .
|
||||||
paths:
|
paths:
|
||||||
- .gradle
|
- .gradle
|
||||||
- workspace
|
- workspace
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: dd-trace-java-{{ checksum "dd-trace-java.gradle" }}-{{ .Branch }}-{{ .Revision }}
|
key: dd-trace-java-{{ checksum "dd-trace-java.gradle" }}-{{ .Branch }}-{{ .Revision }}
|
||||||
paths: ~/.gradle
|
paths: ~/.gradle
|
||||||
|
|
||||||
|
|
||||||
default_test_job: &default_test_job
|
default_test_job: &default_test_job
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
- image: *default_container
|
- image: *default_container
|
||||||
# This is used by spymemcached instrumentation tests
|
# This is used by spymemcached instrumentation tests
|
||||||
- image: memcached
|
- image: memcached
|
||||||
# This is used by rabbitmq instrumentation tests
|
# This is used by rabbitmq instrumentation tests
|
||||||
- image: rabbitmq
|
- image: rabbitmq
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: .
|
at: .
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
<<: *cache_keys
|
<<: *cache_keys
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
command: GRADLE_OPTS="-Ddatadog.forkedMaxHeapSize=4G -Ddatadog.forkedMinHeapSize=64M" ./gradlew $TEST_TASK --build-cache --parallel --stacktrace --no-daemon --max-workers=6
|
command: GRADLE_OPTS="-Ddatadog.forkedMaxHeapSize=4G -Ddatadog.forkedMinHeapSize=64M" ./gradlew $TEST_TASK --build-cache --parallel --stacktrace --no-daemon --max-workers=6
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Collect Reports
|
name: Collect Reports
|
||||||
when: on_fail
|
when: on_fail
|
||||||
command: .circleci/collect_reports.sh
|
command: .circleci/collect_reports.sh
|
||||||
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: ./reports
|
path: ./reports
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Collect Test Results
|
name: Collect Test Results
|
||||||
when: always
|
when: always
|
||||||
command: .circleci/collect_results.sh
|
command: .circleci/collect_results.sh
|
||||||
|
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ./results
|
path: ./results
|
||||||
|
|
||||||
test_7:
|
test_7:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJava7
|
- TEST_TASK: testJava7
|
||||||
|
|
||||||
test_8:
|
test_8:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
# We are building on Java8, this is our default JVM so no need to set more homes
|
# We are building on Java8, this is our default JVM so no need to set more homes
|
||||||
- TEST_TASK: test jacocoTestReport jacocoTestCoverageVerification
|
- TEST_TASK: test jacocoTestReport jacocoTestCoverageVerification
|
||||||
|
|
||||||
test_latest8:
|
test_latest8:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
# We are building on Java8, this is our default JVM so no need to set more homes
|
# We are building on Java8, this is our default JVM so no need to set more homes
|
||||||
- TEST_TASK: latestDepTest
|
- TEST_TASK: latestDepTest
|
||||||
|
|
||||||
test_ibm8:
|
test_ibm8:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJavaIBM8
|
- TEST_TASK: testJavaIBM8
|
||||||
|
|
||||||
test_zulu8:
|
test_zulu8:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJavaZULU8
|
- TEST_TASK: testJavaZULU8
|
||||||
|
|
||||||
test_9:
|
test_9:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJava9
|
- TEST_TASK: testJava9
|
||||||
|
|
||||||
test_10:
|
test_10:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJava10
|
- TEST_TASK: testJava10
|
||||||
|
|
||||||
test_11:
|
test_11:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJava11
|
- TEST_TASK: testJava11
|
||||||
|
|
||||||
test_zulu11:
|
test_zulu11:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJavaZULU11
|
- TEST_TASK: testJavaZULU11
|
||||||
|
|
||||||
test_12:
|
test_12:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJava12
|
- TEST_TASK: testJava12
|
||||||
|
|
||||||
test_13:
|
test_13:
|
||||||
<<: *default_test_job
|
<<: *default_test_job
|
||||||
environment:
|
environment:
|
||||||
- TEST_TASK: testJava13
|
- TEST_TASK: testJava13
|
||||||
|
|
||||||
agent_integration_tests:
|
agent_integration_tests:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
docker:
|
docker:
|
||||||
- image: *default_container
|
- image: *default_container
|
||||||
- image: datadog/docker-dd-agent
|
- image: datadog/docker-dd-agent
|
||||||
environment:
|
environment:
|
||||||
- DD_APM_ENABLED=true
|
- DD_APM_ENABLED=true
|
||||||
- DD_BIND_HOST=0.0.0.0
|
- DD_BIND_HOST=0.0.0.0
|
||||||
- DD_API_KEY=invalid_key_but_this_is_fine
|
- DD_API_KEY=invalid_key_but_this_is_fine
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: .
|
at: .
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
<<: *cache_keys
|
<<: *cache_keys
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Run Trace Agent Tests
|
name: Run Trace Agent Tests
|
||||||
command: ./gradlew traceAgentTest --build-cache --parallel --stacktrace --no-daemon --max-workers=8
|
command: ./gradlew traceAgentTest --build-cache --parallel --stacktrace --no-daemon --max-workers=8
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Collect Reports
|
name: Collect Reports
|
||||||
when: on_fail
|
when: on_fail
|
||||||
command: .circleci/collect_reports.sh
|
command: .circleci/collect_reports.sh
|
||||||
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: ./reports
|
path: ./reports
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Collect Test Results
|
name: Collect Test Results
|
||||||
when: always
|
when: always
|
||||||
command: .circleci/collect_results.sh
|
command: .circleci/collect_results.sh
|
||||||
|
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ./results
|
path: ./results
|
||||||
|
|
||||||
check:
|
check:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: .
|
at: .
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
<<: *cache_keys
|
<<: *cache_keys
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Build Project
|
name: Build Project
|
||||||
command: GRADLE_OPTS="-Ddatadog.forkedMaxHeapSize=4G -Ddatadog.forkedMinHeapSize=64M" ./gradlew check -PskipTests --build-cache --parallel --stacktrace --no-daemon --max-workers=8
|
command: GRADLE_OPTS="-Ddatadog.forkedMaxHeapSize=4G -Ddatadog.forkedMinHeapSize=64M" ./gradlew check -PskipTests --build-cache --parallel --stacktrace --no-daemon --max-workers=8
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Collect Reports
|
name: Collect Reports
|
||||||
when: always
|
when: always
|
||||||
command: .circleci/collect_reports.sh
|
command: .circleci/collect_reports.sh
|
||||||
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: ./reports
|
path: ./reports
|
||||||
|
|
||||||
muzzle:
|
muzzle:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
# Reset the cache approx every release
|
# Reset the cache approx every release
|
||||||
keys:
|
keys:
|
||||||
- dd-trace-java-muzzle-{{ checksum "dd-trace-java.gradle" }}
|
- dd-trace-java-muzzle-{{ checksum "dd-trace-java.gradle" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Verify Muzzle
|
name: Verify Muzzle
|
||||||
command: SKIP_BUILDSCAN="true" GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx4G -Xms64M' -Ddatadog.forkedMaxHeapSize=4G -Ddatadog.forkedMinHeapSize=64M" ./gradlew muzzle --parallel --stacktrace --no-daemon --max-workers=16
|
command: SKIP_BUILDSCAN="true" GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx4G -Xms64M' -Ddatadog.forkedMaxHeapSize=4G -Ddatadog.forkedMinHeapSize=64M" ./gradlew muzzle --parallel --stacktrace --no-daemon --max-workers=16
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: dd-trace-java-muzzle-{{ checksum "dd-trace-java.gradle" }}
|
key: dd-trace-java-muzzle-{{ checksum "dd-trace-java.gradle" }}
|
||||||
paths: ~/.gradle
|
paths: ~/.gradle
|
||||||
|
|
||||||
publish: &publish
|
publish: &publish
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: .
|
at: .
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
<<: *cache_keys
|
<<: *cache_keys
|
||||||
|
|
||||||
- deploy:
|
- deploy:
|
||||||
name: Publish master to Artifactory
|
name: Publish master to Artifactory
|
||||||
command: |
|
command: |
|
||||||
./gradlew \
|
./gradlew \
|
||||||
-PbintrayUser=${BINTRAY_USER} \
|
-PbintrayUser=${BINTRAY_USER} \
|
||||||
-PbintrayApiKey=${BINTRAY_API_KEY} \
|
-PbintrayApiKey=${BINTRAY_API_KEY} \
|
||||||
-PbuildInfo.build.number=${CIRCLE_BUILD_NUM} \
|
-PbuildInfo.build.number=${CIRCLE_BUILD_NUM} \
|
||||||
artifactoryPublish --max-workers=1 --build-cache --stacktrace --no-daemon
|
artifactoryPublish --max-workers=1 --build-cache --stacktrace --no-daemon
|
||||||
|
|
||||||
publish_master:
|
publish_master:
|
||||||
<<: *publish
|
<<: *publish
|
||||||
|
@ -251,137 +251,137 @@ workflows:
|
||||||
version: 2
|
version: 2
|
||||||
build_test_deploy:
|
build_test_deploy:
|
||||||
jobs:
|
jobs:
|
||||||
- build:
|
- build:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
|
||||||
- test_7:
|
- test_7:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_8:
|
- test_8:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_latest8:
|
- test_latest8:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_ibm8:
|
- test_ibm8:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_zulu8:
|
- test_zulu8:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_9:
|
- test_9:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_10:
|
- test_10:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_11:
|
- test_11:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_zulu11:
|
- test_zulu11:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_12:
|
- test_12:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
- test_13:
|
- test_13:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
|
||||||
- agent_integration_tests:
|
- agent_integration_tests:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
|
||||||
- check:
|
- check:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
|
||||||
- muzzle:
|
- muzzle:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore: master
|
ignore: master
|
||||||
|
|
||||||
- publish_master:
|
- publish_master:
|
||||||
requires:
|
requires:
|
||||||
- test_7
|
- test_7
|
||||||
- test_8
|
- test_8
|
||||||
- test_latest8
|
- test_latest8
|
||||||
- test_ibm8
|
- test_ibm8
|
||||||
- test_zulu8
|
- test_zulu8
|
||||||
- test_9
|
- test_9
|
||||||
- test_10
|
- test_10
|
||||||
- test_11
|
- test_11
|
||||||
- test_zulu11
|
- test_zulu11
|
||||||
- test_12
|
- test_12
|
||||||
- test_13
|
- test_13
|
||||||
- agent_integration_tests
|
- agent_integration_tests
|
||||||
- check
|
- check
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only: master
|
||||||
tags:
|
tags:
|
||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
|
|
||||||
- publish_tag:
|
- publish_tag:
|
||||||
requires:
|
requires:
|
||||||
- test_7
|
- test_7
|
||||||
- test_8
|
- test_8
|
||||||
- test_latest8
|
- test_latest8
|
||||||
- test_ibm8
|
- test_ibm8
|
||||||
- test_zulu8
|
- test_zulu8
|
||||||
- test_9
|
- test_9
|
||||||
- test_10
|
- test_10
|
||||||
- test_11
|
- test_11
|
||||||
- test_zulu11
|
- test_zulu11
|
||||||
- test_12
|
- test_12
|
||||||
- test_13
|
- test_13
|
||||||
- agent_integration_tests
|
- agent_integration_tests
|
||||||
- check
|
- check
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
tags:
|
tags:
|
||||||
only: /^v.*/
|
only: /^v.*/
|
||||||
|
|
Loading…
Reference in New Issue