From 061c6697ca53a300792d76e49c86503485fd8039 Mon Sep 17 00:00:00 2001 From: Ashmita Date: Sat, 13 Feb 2021 07:23:56 +1100 Subject: [PATCH] Add hotrod in release and push all tags (#2812) --- .github/workflows/ci-all-in-one-build.yml | 2 +- .github/workflows/ci-cassandra.yml | 2 +- .github/workflows/ci-crossdock.yml | 2 +- .github/workflows/ci-docker-build.yml | 2 +- .github/workflows/ci-elasticsearch.yml | 2 +- .github/workflows/ci-hotrod.yml | 2 +- .github/workflows/ci-kafka.yml | 2 +- .github/workflows/ci-release.yml | 12 +- .travis.yml | 104 ------------------ CONTRIBUTING.md | 3 +- plugin/storage/es/README.md | 4 +- .../{travis => }/build-all-in-one-image.sh | 4 +- scripts/{travis => }/build-crossdock.sh | 2 +- .../cassandra-integration-test.sh | 0 scripts/{travis => }/es-integration-test.sh | 0 .../{travis => }/hotrod-integration-test.sh | 2 +- .../{travis => }/kafka-integration-test.sh | 0 scripts/{travis => }/package-deploy.sh | 0 scripts/travis/build-docker-images.sh | 12 -- scripts/travis/install-crossdock-deps.sh | 12 -- scripts/travis/install-ui-deps.sh | 13 --- .../{travis => }/upload-all-docker-images.sh | 2 +- scripts/{travis => }/upload-to-registry.sh | 2 +- 23 files changed, 25 insertions(+), 161 deletions(-) delete mode 100644 .travis.yml rename scripts/{travis => }/build-all-in-one-image.sh (95%) rename scripts/{travis => }/build-crossdock.sh (90%) rename scripts/{travis => }/cassandra-integration-test.sh (100%) rename scripts/{travis => }/es-integration-test.sh (100%) rename scripts/{travis => }/hotrod-integration-test.sh (94%) rename scripts/{travis => }/kafka-integration-test.sh (100%) rename scripts/{travis => }/package-deploy.sh (100%) delete mode 100755 scripts/travis/build-docker-images.sh delete mode 100644 scripts/travis/install-crossdock-deps.sh delete mode 100644 scripts/travis/install-ui-deps.sh rename scripts/{travis => }/upload-all-docker-images.sh (94%) rename scripts/{travis => }/upload-to-registry.sh (98%) diff --git a/.github/workflows/ci-all-in-one-build.yml b/.github/workflows/ci-all-in-one-build.yml index 8c07671f98c..09ff7fd6e1b 100644 --- a/.github/workflows/ci-all-in-one-build.yml +++ b/.github/workflows/ci-all-in-one-build.yml @@ -33,7 +33,7 @@ jobs: run: make install-ci - name: Build, test, and publish all-in-one image - run: bash scripts/travis/build-all-in-one-image.sh + run: bash scripts/build-all-in-one-image.sh env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} diff --git a/.github/workflows/ci-cassandra.yml b/.github/workflows/ci-cassandra.yml index b1a3d6879d6..8e26fc22ca4 100644 --- a/.github/workflows/ci-cassandra.yml +++ b/.github/workflows/ci-cassandra.yml @@ -17,4 +17,4 @@ jobs: go-version: ^1.15 - name: Run cassandra integration tests - run: bash scripts/travis/cassandra-integration-test.sh + run: bash scripts/cassandra-integration-test.sh diff --git a/.github/workflows/ci-crossdock.yml b/.github/workflows/ci-crossdock.yml index 37628e00a78..87ed0f8c733 100644 --- a/.github/workflows/ci-crossdock.yml +++ b/.github/workflows/ci-crossdock.yml @@ -13,7 +13,7 @@ jobs: matrix: steps: - name: crossdock - cmd: bash scripts/travis/build-crossdock.sh + cmd: bash scripts/build-crossdock.sh - name: crossdock-otel cmd: make build-crossdock crossdock-otel name: ${{ matrix.steps.name }} diff --git a/.github/workflows/ci-docker-build.yml b/.github/workflows/ci-docker-build.yml index ef5d49c1bf6..92adf46f9a7 100644 --- a/.github/workflows/ci-docker-build.yml +++ b/.github/workflows/ci-docker-build.yml @@ -36,7 +36,7 @@ jobs: run: make docker - name: Upload docker images - run: bash scripts/travis/upload-all-docker-images.sh + run: bash scripts/upload-all-docker-images.sh env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} diff --git a/.github/workflows/ci-elasticsearch.yml b/.github/workflows/ci-elasticsearch.yml index 8e728ff92a4..a8c9fa1de79 100644 --- a/.github/workflows/ci-elasticsearch.yml +++ b/.github/workflows/ci-elasticsearch.yml @@ -36,4 +36,4 @@ jobs: run: make install-ci - name: Run elasticsearch integration tests - run: bash scripts/travis/es-integration-test.sh ${{ matrix.version.image }} + run: bash scripts/es-integration-test.sh ${{ matrix.version.image }} diff --git a/.github/workflows/ci-hotrod.yml b/.github/workflows/ci-hotrod.yml index 4c2d2defd3a..e416aa2a2bc 100644 --- a/.github/workflows/ci-hotrod.yml +++ b/.github/workflows/ci-hotrod.yml @@ -29,7 +29,7 @@ jobs: run: make install-ci - name: Build, test, and publish hotrod image - run: bash scripts/travis/hotrod-integration-test.sh + run: bash scripts/hotrod-integration-test.sh env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} diff --git a/.github/workflows/ci-kafka.yml b/.github/workflows/ci-kafka.yml index c10af5740ad..403d89057f6 100644 --- a/.github/workflows/ci-kafka.yml +++ b/.github/workflows/ci-kafka.yml @@ -17,4 +17,4 @@ jobs: go-version: ^1.15 - name: Run kafka integration tests - run: bash scripts/travis/kafka-integration-test.sh + run: bash scripts/kafka-integration-test.sh diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 4457fde1022..c98a96b639a 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -37,7 +37,7 @@ jobs: - name: Package binaries id: package-binaries - run: bash scripts/travis/package-deploy.sh + run: bash scripts/package-deploy.sh if: steps.build-binaries.outcome == 'success' - name: Upload binaries @@ -54,14 +54,20 @@ jobs: run: make docker - name: Upload docker images - run: bash scripts/travis/upload-all-docker-images.sh + run: bash scripts/upload-all-docker-images.sh if: steps.build-images.outcome == 'success' env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} - name: Build, test, and publish all-in-one image - run: bash scripts/travis/build-all-in-one-image.sh + run: bash scripts/build-all-in-one-image.sh + env: + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} + + - name: Build, test, and publish hotrod image + run: bash scripts/hotrod-integration-test.sh env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ffddbc460a5..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,104 +0,0 @@ -sudo: required - -language: go -go_import_path: github.com/jaegertracing/jaeger - -dist: bionic - -matrix: - include: - - go: "1.15.x" - env: - - TESTS=true - - COVERAGE=true - - go: "1.15.x" - env: - - PROTO_GEN_TEST=true - - go: "1.15.x" - env: - - ALL_IN_ONE=true - - go: "1.15.x" - env: - - CROSSDOCK=true - - go: "1.15.x" - env: - - CROSSDOCK_OTEL=true - - go: "1.15.x" - env: - - DOCKER=true - - DEPLOY=true - - go: "1.15.x" - env: - - ES_INTEGRATION_TEST=true - - go: "1.15.x" - env: - - ES_OTEL_INTEGRATION_TEST=true - - go: "1.15.x" - env: - - KAFKA_INTEGRATION_TEST=true - - go: "1.15.x" - env: - - CASSANDRA_INTEGRATION_TEST=true - - go: "1.15.x" - env: - - MEM_AND_BADGER_INTEGRATION_TEST=true - - go: "1.15.x" - env: - - HOTROD=true - -services: - - docker - -env: - global: - - DOCKER_COMPOSE_VERSION=1.8.0 - - COMMIT=${TRAVIS_COMMIT::8} - # override default yarn - - PATH=$HOME/.yarn/bin:$PATH - -install: - - docker rmi $(docker images -q) || true - - travis_retry make install-ci - - if [ "$ALL_IN_ONE" == true ]; then bash ./scripts/travis/install-ui-deps.sh ; fi - - if [ "$DOCKER" == true ]; then bash ./scripts/travis/install-ui-deps.sh ; fi - - if [ "$CROSSDOCK" == true ]; then bash ./scripts/travis/install-crossdock-deps.sh ; fi - -script: - - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) - - if [ "$TESTS" == true ]; then make test-ci ; else echo 'skipping tests'; fi - - if [ "$PROTO_GEN_TEST" == true ]; then make proto && git diff --name-status --exit-code ; else echo 'skipping protoc validation'; fi - - if [ "$ALL_IN_ONE" == true ]; then make create-baseimg-debugimg && bash ./scripts/travis/build-all-in-one-image.sh ; else echo 'skipping all_in_one'; fi - - if [ "$CROSSDOCK" == true ]; then travis_retry bash ./scripts/travis/build-crossdock.sh ; else echo 'skipping crossdock'; fi - - if [ "$CROSSDOCK_OTEL" == true ]; then travis_retry make build-crossdock crossdock-otel ; else echo 'skipping OpenTelemetry crossdock'; fi - - if [ "$DOCKER" == true ]; then bash ./scripts/travis/build-docker-images.sh ; else echo 'skipping build-docker-images'; fi - - if [ "$DOCKER" == true ]; then bash ./scripts/travis/upload-all-docker-images.sh ; else echo 'skipping docker upload'; fi - - if [ "$DEPLOY" == true ]; then make build-all-platforms ; else echo 'skipping build-all-platforms'; fi - - if [ "$ES_INTEGRATION_TEST" == true ]; then travis_retry bash ./scripts/travis/es-integration-test.sh ; else echo 'skipping elastic search integration test'; fi - - if [ "$ES_OTEL_INTEGRATION_TEST" == true ]; then travis_retry bash ./scripts/travis/es-integration-test.sh ; else echo 'skipping elastic search integration test'; fi - - if [ "$KAFKA_INTEGRATION_TEST" == true ]; then travis_retry bash ./scripts/travis/kafka-integration-test.sh ; else echo 'skipping kafka integration test'; fi - - if [ "$CASSANDRA_INTEGRATION_TEST" == true ]; then travis_retry bash ./scripts/travis/cassandra-integration-test.sh ; else echo 'skipping cassandra integration test'; fi - - if [ "$MEM_AND_BADGER_INTEGRATION_TEST" == true ]; then travis_retry make mem-and-badger-storage-integration-test ; else echo 'skipping mem and badger integration test'; fi - - if [ "$HOTROD" == true ]; then bash ./scripts/travis/hotrod-integration-test.sh ; else echo 'skipping hotrod example'; fi - -after_success: - - if [ "$COVERAGE" == true ]; then mv cover.out coverage.txt ; else echo 'skipping coverage'; fi - - if [ "$COVERAGE" == true ]; then bash <(curl -s https://codecov.io/bash) ; else echo 'skipping coverage'; fi - -after_failure: - - if [ "$CROSSDOCK" == true || "$CROSSDOCK_OTEL" == true ]; then make crossdock-logs ; else echo 'skipping crossdock'; fi - -before_deploy: - - if [ "$DEPLOY" == true ]; then bash ./scripts/travis/package-deploy.sh ; else echo 'skipping deploying binaries'; fi - -deploy: - provider: releases - api_key: - secure: P3+TKR3y4S51jjMp4l9kRm5cjr7Mg2m5rlPcRCjjVp/mVgkkhsMx9K8Rj/Cv/pJe33jbkwRy020gq4lYpa+Yh+Q3A11z3EKXyqizwqsvJtufoIXxXCxt0kLXn8aIh7aLrqVT2wxtkv3RvkRODmLZqvWG4kAfNBuzpcFhstw1RU3WNyahStOgwVJ9tYRdpsJ0ztMmGgQFpT6bppselzEXY7hS7L+l/bLcH9aGON4YECupAE6EilWwGxPs4oLJPmGsWQNogb3SE/oeFDqEJzciWcObk264fwIBf28HtmszQSmVbOuOfg/OhcVg13OvPXmRGk9hvU2kyzehMLZ0zeEE1mKsGmoObziNVuYPPY3KbRlsYARX41M1QKAI1YFe9NIXC5yhemOy4Xv0g82jyZmYWrf6QydLBZWkztUL7mJ6DkrG+5EohVVC2oprBS32/w736f8AWwHJSfL/JrFMTDctdYzUaf0yZMdfKdLdRyP/Q5KTfhUJl8zHAOih8f23WJVCSlwyJBYDzkq5OmNGf7BxJYkJExUOUwXcJE9jYgXq0y291N9BtG2cUVKhZZsSSrvR32bMtYtTT2a3ZlTHJpzVI+lZStYDpE/wyJRqnjqf9p8bDxc1l2mQGSxgyY8Yv8u9c+RCCj4tRwZTrJ4LIBWecDPS5hobV3Q1Dg3sW2UGRXA= - file_glob: true - file: - - deploy/*.tar.gz - skip_cleanup: true - on: - tags: true - repo: jaegertracing/jaeger - branch: master diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cef2d4dafd7..593d72d074a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,8 +87,7 @@ github.com/jaegertracing/jaeger spanstore/ - SpanReader / SpanWriter implementations dependencystore/ elasticsearch/ - ES implementations of storage APIs - scripts/ - Miscellaneous project scripts, e.g. license update script - travis/ - Travis scripts called in .travis.yml + scripts/ - Miscellaneous project scripts, e.g. github action and license update script storage/ spanstore/ - SpanReader / SpanWriter interfaces dependencystore/ diff --git a/plugin/storage/es/README.md b/plugin/storage/es/README.md index a3439d8385f..9cfb31efdda 100644 --- a/plugin/storage/es/README.md +++ b/plugin/storage/es/README.md @@ -50,9 +50,9 @@ To locally test the ElasticSearch storage plugin, * have [ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html) running on port 9200 * run `STORAGE=es make storage-integration-test` in the top folder. -All integration tests also run on pull request via Travis. This integration test is against ElasticSearch v5.4.0. +All integration tests also run on pull request via GitHub Actions. This integration test is against ElasticSearch v5.6.16, v6.8.2 and v7.3.0. -* The script used in Travis can be found under `./travis/es-integration-test.sh`, +* The script used in GitHub Actions can be found under `scripts/es-integration-test.sh`, and that script be run from the top folder to integration test ElasticSearch as well. This script requires Docker to be running. diff --git a/scripts/travis/build-all-in-one-image.sh b/scripts/build-all-in-one-image.sh similarity index 95% rename from scripts/travis/build-all-in-one-image.sh rename to scripts/build-all-in-one-image.sh index a25e53c8633..624fbb0a4b2 100755 --- a/scripts/travis/build-all-in-one-image.sh +++ b/scripts/build-all-in-one-image.sh @@ -5,7 +5,7 @@ set -exu BRANCH=${BRANCH:?'missing BRANCH env var'} # Set default GOARCH variable to the host GOARCH, the target architecture can # be overrided by passing architecture value to the script: -# `GOARCH= ./scripts/travis/build-all-in-one-image.sh`. +# `GOARCH= ./scripts/build-all-in-one-image.sh`. GOARCH=${GOARCH:-$(go env GOARCH)} expected_version="v10" @@ -39,7 +39,7 @@ upload_to_docker() { if [[ "$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "upload $1 to dockerhub/quay.io" REPO=$1 - bash scripts/travis/upload-to-registry.sh $REPO + bash scripts/upload-to-registry.sh $REPO else echo 'skip docker images upload for PR' fi diff --git a/scripts/travis/build-crossdock.sh b/scripts/build-crossdock.sh similarity index 90% rename from scripts/travis/build-crossdock.sh rename to scripts/build-crossdock.sh index 43c20aad081..f17f90dddc9 100755 --- a/scripts/travis/build-crossdock.sh +++ b/scripts/build-crossdock.sh @@ -18,4 +18,4 @@ fi # docker image has been build when running the crossdock REPO=jaegertracing/test-driver docker tag $REPO:latest $REPO:$COMMIT -bash scripts/travis/upload-to-registry.sh $REPO +bash scripts/upload-to-registry.sh $REPO diff --git a/scripts/travis/cassandra-integration-test.sh b/scripts/cassandra-integration-test.sh similarity index 100% rename from scripts/travis/cassandra-integration-test.sh rename to scripts/cassandra-integration-test.sh diff --git a/scripts/travis/es-integration-test.sh b/scripts/es-integration-test.sh similarity index 100% rename from scripts/travis/es-integration-test.sh rename to scripts/es-integration-test.sh diff --git a/scripts/travis/hotrod-integration-test.sh b/scripts/hotrod-integration-test.sh similarity index 94% rename from scripts/travis/hotrod-integration-test.sh rename to scripts/hotrod-integration-test.sh index c3a3aae713b..91790ba3010 100755 --- a/scripts/travis/hotrod-integration-test.sh +++ b/scripts/hotrod-integration-test.sh @@ -27,4 +27,4 @@ else exit 0 fi -bash scripts/travis/upload-to-registry.sh $REPO +bash scripts/upload-to-registry.sh $REPO diff --git a/scripts/travis/kafka-integration-test.sh b/scripts/kafka-integration-test.sh similarity index 100% rename from scripts/travis/kafka-integration-test.sh rename to scripts/kafka-integration-test.sh diff --git a/scripts/travis/package-deploy.sh b/scripts/package-deploy.sh similarity index 100% rename from scripts/travis/package-deploy.sh rename to scripts/package-deploy.sh diff --git a/scripts/travis/build-docker-images.sh b/scripts/travis/build-docker-images.sh deleted file mode 100755 index 54207f59483..00000000000 --- a/scripts/travis/build-docker-images.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -# Build UI and all Docker images - -set -e - -# TODO avoid building the UI when on a PR branch: https://github.com/jaegertracing/jaeger/issues/1908 -source ~/.nvm/nvm.sh -nvm use 10 - -export DOCKER_NAMESPACE=jaegertracing -make docker diff --git a/scripts/travis/install-crossdock-deps.sh b/scripts/travis/install-crossdock-deps.sh deleted file mode 100644 index fb07181c261..00000000000 --- a/scripts/travis/install-crossdock-deps.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e - -docker version - -# Install docker-compose -sudo rm -f /usr/local/bin/docker-compose -curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /tmp/docker-compose -chmod +x /tmp/docker-compose -sudo mv /tmp/docker-compose /usr/local/bin -docker-compose version diff --git a/scripts/travis/install-ui-deps.sh b/scripts/travis/install-ui-deps.sh deleted file mode 100644 index f46642c2e61..00000000000 --- a/scripts/travis/install-ui-deps.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e - -# Repo for newer Node.js versions -curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - - -curl -o- -L https://yarnpkg.com/install.sh | bash - -source ~/.nvm/nvm.sh -nvm install 10 - -yarn --version diff --git a/scripts/travis/upload-all-docker-images.sh b/scripts/upload-all-docker-images.sh similarity index 94% rename from scripts/travis/upload-all-docker-images.sh rename to scripts/upload-all-docker-images.sh index 4b6eab8e54d..2723dd43dd2 100755 --- a/scripts/travis/upload-all-docker-images.sh +++ b/scripts/upload-all-docker-images.sh @@ -38,5 +38,5 @@ jaeger_components=( for component in "${jaeger_components[@]}" do REPO="jaegertracing/jaeger-${component}" - bash scripts/travis/upload-to-registry.sh $REPO + bash scripts/upload-to-registry.sh $REPO done diff --git a/scripts/travis/upload-to-registry.sh b/scripts/upload-to-registry.sh similarity index 98% rename from scripts/travis/upload-to-registry.sh rename to scripts/upload-to-registry.sh index aee909d3847..920a9b9922a 100755 --- a/scripts/travis/upload-to-registry.sh +++ b/scripts/upload-to-registry.sh @@ -85,7 +85,7 @@ upload_images() { docker push ${registry}/${image}:latest ;; *) - docker push ${registry}/${image} + docker push --all-tags ${registry}/${image} ;; esac