From 8ea8413fdfef819c78171c7461ed9c51906ef3fa Mon Sep 17 00:00:00 2001 From: Nikita Salnikov-Tarnovski Date: Fri, 30 Oct 2020 05:13:25 +0200 Subject: [PATCH] Stop using CircleCI (#1527) --- .circleci/collect_libs.sh | 13 --- .circleci/collect_reports.sh | 30 ----- .circleci/collect_results.sh | 15 --- .circleci/config.yml | 212 ----------------------------------- 4 files changed, 270 deletions(-) delete mode 100755 .circleci/collect_libs.sh delete mode 100755 .circleci/collect_reports.sh delete mode 100755 .circleci/collect_results.sh delete mode 100644 .circleci/config.yml diff --git a/.circleci/collect_libs.sh b/.circleci/collect_libs.sh deleted file mode 100755 index 40b3bb074f..0000000000 --- a/.circleci/collect_libs.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/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/ diff --git a/.circleci/collect_reports.sh b/.circleci/collect_reports.sh deleted file mode 100755 index 9cb27f8e94..0000000000 --- a/.circleci/collect_reports.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/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 diff --git a/.circleci/collect_results.sh b/.circleci/collect_results.sh deleted file mode 100755 index bde5432216..0000000000 --- a/.circleci/collect_results.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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 \; diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1607e56a7e..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,212 +0,0 @@ -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.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.*$/