Stop using CircleCI
DELETE
.circleci/collect_libs.sh
-#!/usr/bin/env bash
-
-# Save all important libs into (project-root)/libs
-# This folder will be saved by circleci and available after test runs.
-
-set -x
-set -e
-
-LIBS_DIR=./libs/
-mkdir -p $LIBS_DIR >/dev/null 2>&1
-
-cp workspace/javaagent/build/libs/*.jar $LIBS_DIR/
-cp workspace/javaagent-exporters/*/build/libs/*.jar $LIBS_DIR/

DELETE
.circleci/collect_reports.sh
-#!/usr/bin/env bash
-
-# Save all important reports into (project-root)/reports
-# This folder will be saved by circleci and available after test runs.
-
-set -e
-#Enable '**' support
-shopt -s globstar
-
-REPORTS_DIR=./reports
-mkdir -p $REPORTS_DIR >/dev/null 2>&1
-
-cp /tmp/hs_err_pid*.log $REPORTS_DIR || true
-
-function save_reports () {
- project_to_save=$1
- echo "saving reports for $project_to_save"
-
- report_path=$REPORTS_DIR/$project_to_save
- mkdir -p $report_path
- cp -r workspace/$project_to_save/build/reports/* $report_path/
-}
-
-shopt -s globstar
-
-for report_path in workspace/**/build/reports; do
- report_path=${report_path//workspace\//}
- report_path=${report_path//\/build\/reports/}
- save_reports $report_path
-done

DELETE
.circleci/collect_results.sh
-#!/usr/bin/env bash
-
-# Save all important reports and artifacts into (project-root)/results
-# This folder will be saved by circleci and available after test runs.
-
-set -e
-#Enable '**' support
-shopt -s globstar
-
-TEST_RESULTS_DIR=./results
-mkdir -p $TEST_RESULTS_DIR >/dev/null 2>&1
-
-echo "saving test results"
-mkdir -p $TEST_RESULTS_DIR/results
-find workspace/**/build/test-results -name \*.xml -exec cp {} $TEST_RESULTS_DIR \;

DELETE
.circleci/config.yml
-version: 2.1
-
-defaults: &defaults
- working_directory: ~/dd-trace-java
- resource_class: xlarge
- docker:
- - image: &default_container datadog/dd-trace-java-docker-build:latest
- environment:
- JAVA_HOME: /usr/local/openjdk-11
-
-cache_keys: &cache_keys
- keys:
- # Rev the version when the cache gets too big
- - trace-java-v1-{{ .Branch }}-{{ .Revision }}
- - trace-java-v1-{{ .Branch }}
-
-parameters:
- gradle_flags:
- type: string
- default: "--stacktrace --no-daemon"
-
-jobs:
- build:
- <<: *defaults
-
- steps:
- - checkout
-
- - restore_cache:
- <<: *cache_keys
-
- - run:
- name: Build Project
- command: >-
- GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx1G -Xms64M' -Dotel.forkedMaxHeapSize=1G -Dotel.forkedMinHeapSize=64M"
- ./gradlew clean build shadowJar -x test
- << pipeline.parameters.gradle_flags >>
- --max-workers=8
-
- - run:
- name: Collect Libs
- when: always
- command: .circleci/collect_libs.sh
-
- - store_artifacts:
- path: ./libs
-
- - run:
- name: Collect Reports
- when: on_fail
- command: .circleci/collect_reports.sh
-
- - store_artifacts:
- path: ./reports
-
- - persist_to_workspace:
- root: .
- paths:
- - .gradle
- - workspace
-
- - save_cache:
- key: trace-java-v1-{{ .Branch }}-{{ .Revision }}
- paths: ~/.gradle
-
-
- default_test_job: &default_test_job
- <<: *defaults
-
- docker:
- - image: *default_container
- environment:
- JAVA_HOME: /usr/local/openjdk-11
- # This is used by spymemcached instrumentation tests
- - image: memcached
- # This is used by rabbitmq instrumentation tests
- - image: rabbitmq
-
- parameters:
- testTask:
- type: string
- prefixTestTask:
- default: false
- type: boolean
-
- steps:
- - checkout
-
- - attach_workspace:
- at: .
-
- - restore_cache:
- <<: *cache_keys
-
- - run:
- name: Run Tests
- command: >-
- GRADLE_OPTS="-Dotel.forkedMaxHeapSize=4G -Dotel.forkedMinHeapSize=64M"
- ./gradlew <<# parameters.prefixTestTask>>testJava<</ parameters.prefixTestTask>><< parameters.testTask >> -x :smoke-tests:test
- << pipeline.parameters.gradle_flags >>
- --max-workers=6
-
- - run:
- name: Collect Reports
- when: on_fail
- command: .circleci/collect_reports.sh
-
- - store_artifacts:
- path: ./reports
-
- - run:
- name: Collect Test Results
- when: always
- command: .circleci/collect_results.sh
-
- - store_test_results:
- path: ./results
-
- muzzle:
- <<: *defaults
- steps:
- - checkout
-
- # We are not running with a cache here because it gets very big and ends up taking more time
- # restoring/saving than the actual increase in time it takes just downloading the artifacts each time.
-
- - run:
- name: Verify Muzzle
- command: >-
- SKIP_BUILDSCAN="true"
- GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx4G -Xms64M' -Dotel.forkedMaxHeapSize=4G -Dotel.forkedMinHeapSize=64M"
- ./gradlew muzzle --parallel --stacktrace --no-daemon --max-workers=16
-
- publish: &publish
- <<: *defaults
- steps:
- - checkout
-
- - attach_workspace:
- at: .
-
- - restore_cache:
- <<: *cache_keys
-
- - deploy:
- name: Publish master to Artifactory
- command: |
- ./gradlew \
- -PbuildInfo.build.number=${CIRCLE_BUILD_NUM} \
- snapshot --max-workers=1 --build-cache --stacktrace --no-daemon
-
- publish_master:
- <<: *publish
-
- release:
- <<: *defaults
- steps:
- - checkout
-
- - attach_workspace:
- at: .
-
- - restore_cache:
- <<: *cache_keys
-
- - run:
- command: ./gradlew -Prelease.useLastTag=true final
- no_output_timeout: 6h
-
-workflows:
- build_test_deploy:
- jobs:
- - build:
- filters:
- tags:
- only: /.*/
-
- - default_test_job:
- requires:
- - build
- name: test_8
- testTask: testJava8
- filters:
- tags:
- only: /.*/
-
- - muzzle:
- requires:
- - build
- filters:
- branches:
- ignore: master
-
- - publish_master:
- requires:
- - test_8
- - muzzle
- filters:
- branches:
- only: master
- tags:
- ignore: /.*/
-
- release:
- jobs:
- - release:
- filters:
- branches:
- ignore: /.*/
- tags:
- # As long as we don't have support branches, we release all tags in the same manner
- only: /^v.*$/

Stop using CircleCI (#1527)