From d5acd02446b0db71d47590a5914fc7161af9c65c Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 6 Jan 2021 12:24:55 -0800 Subject: [PATCH] Remove CircleCI config Move build scripts to the tools directory. --- .circleci/config.yml | 95 ---------------------------- Makefile | 12 ++-- {.circleci => tools}/should_build.sh | 0 {.circleci => tools}/wait.sh | 0 4 files changed, 6 insertions(+), 101 deletions(-) delete mode 100644 .circleci/config.yml rename {.circleci => tools}/should_build.sh (100%) rename {.circleci => tools}/wait.sh (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 841b3c956c8..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,95 +0,0 @@ -version: 2.1 -executors: - current-go: - docker: - - image: circleci/golang:1.15 - prior-go: - docker: - - image: circleci/golang:1.14 - -build-template: &build-template - environment: - TEST_RESULTS: /tmp/test-results # path to where test results will be saved - - steps: - - checkout - - run: mkdir -p $TEST_RESULTS # create the test results directory - - - restore_cache: # restores saved cache if no changes are detected since last run - keys: - - go-pkg-mod-{{ checksum "go.sum" }} - - - run: - name: "Precommit and Coverage Report" - command: | - make ci - find . -name 'coverage.html' > "${TEST_RESULTS}/coverage.lst" - tar -n -cf - -T "${TEST_RESULTS}/coverage.lst" | tar -C "${TEST_RESULTS}" -xvf - - - - save_cache: - key: go-pkg-mod-{{ checksum "go.sum" }} - paths: - - "/go/pkg/mod" - - - store_artifacts: - path: /tmp/test-results - destination: opentelemetry-go-contrib-test-output - - - store_test_results: - path: /tmp/test-results - -jobs: - current-go: - executor: current-go - <<: *build-template - - prior-go: - executor: prior-go - <<: *build-template - - integration: - - parameters: - target: - type: string - description: "The makefile target that will run the tests for the integration." - - machine: - image: ubuntu-1604:202004-01 - - environment: - TEST_RESULTS: /tmp/test-results # path to where test results will be saved - INTEGRATION: << parameters.target >> - - steps: - - checkout - - - run: mkdir -p $TEST_RESULTS - - - run: - name: "Integration test $INTEGRATION" - command: | - make $INTEGRATION - find . -name 'coverage.html' > "${TEST_RESULTS}/coverage.lst" - tar -n -cf - -T "${TEST_RESULTS}/coverage.lst" | tar -C "${TEST_RESULTS}" -xvf - - - - store_artifacts: - path: /tmp/test-results - destination: opentelemetry-go-contrib-test-output - - - store_test_results: - path: /tmp/test-results - -workflows: - version: 2.1 - build_and_test: - jobs: - - current-go - - prior-go - - integration_test: - jobs: - - integration: - matrix: - parameters: - target: [test-gocql, test-mongo-driver, test-gomemcache] \ No newline at end of file diff --git a/Makefile b/Makefile index 617df02ee23..fc9886ca031 100644 --- a/Makefile +++ b/Makefile @@ -59,10 +59,10 @@ ci: precommit check-clean-work-tree test-with-coverage test-386 .PHONY: test-gocql test-gocql: - @if ./.circleci/should_build.sh gocql; then \ + @if ./tools/should_build.sh gocql; then \ set -e; \ docker run --name cass-integ --rm -p 9042:9042 -d cassandra:3; \ - CMD=cassandra IMG_NAME=cass-integ ./.circleci/wait.sh; \ + CMD=cassandra IMG_NAME=cass-integ ./tools/wait.sh; \ (cd instrumentation/github.com/gocql/gocql/otelgocql && \ $(GOTEST_WITH_COVERAGE) . && \ go tool cover -html=coverage.txt -o coverage.html); \ @@ -71,10 +71,10 @@ test-gocql: .PHONY: test-mongo-driver test-mongo-driver: - @if ./.circleci/should_build.sh mongo-driver; then \ + @if ./tools/should_build.sh mongo-driver; then \ set -e; \ docker run --name mongo-integ --rm -p 27017:27017 -d mongo; \ - CMD=mongo IMG_NAME=mongo-integ ./.circleci/wait.sh; \ + CMD=mongo IMG_NAME=mongo-integ ./tools/wait.sh; \ (cd instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo && \ $(GOTEST_WITH_COVERAGE) . && \ go tool cover -html=coverage.txt -o coverage.html); \ @@ -83,10 +83,10 @@ test-mongo-driver: .PHONY: test-gomemcache test-gomemcache: - @if ./.circleci/should_build.sh gomemcache; then \ + @if ./tools/should_build.sh gomemcache; then \ set -e; \ docker run --name gomemcache-integ --rm -p 11211:11211 -d memcached; \ - CMD=gomemcache IMG_NAME=gomemcache-integ ./.circleci/wait.sh; \ + CMD=gomemcache IMG_NAME=gomemcache-integ ./tools/wait.sh; \ (cd instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache && \ $(GOTEST_WITH_COVERAGE) . && \ go tool cover -html=coverage.txt -o coverage.html); \ diff --git a/.circleci/should_build.sh b/tools/should_build.sh similarity index 100% rename from .circleci/should_build.sh rename to tools/should_build.sh diff --git a/.circleci/wait.sh b/tools/wait.sh similarity index 100% rename from .circleci/wait.sh rename to tools/wait.sh