From 1dc06403841b7aff1db2d59b0d3bcb664596c6ed Mon Sep 17 00:00:00 2001 From: Daverkex <144762+Daverkex@users.noreply.github.com> Date: Sun, 31 Jan 2021 00:32:59 +0100 Subject: [PATCH 1/3] Fix Grafana example (#2750) * Fix volume mount Signed-off-by: Daverkex * Fix README typos and incorrect tag name Signed-off-by: Daverkex * Change to neutral text Co-authored-by: Yuri Shkuro Signed-off-by: Daverkex Co-authored-by: Yuri Shkuro --- examples/grafana-integration/README.md | 6 +++--- examples/grafana-integration/docker-compose.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/grafana-integration/README.md b/examples/grafana-integration/README.md index c09cbc6f592..af4be420a41 100644 --- a/examples/grafana-integration/README.md +++ b/examples/grafana-integration/README.md @@ -28,14 +28,14 @@ grafana/loki-docker-driver:latest \ ### Explore with Loki -Currently the most powerful way to correlate application logs with traces can be performed via Grafana's Explore interface. +It is possible to correlate application logs with traces via Grafana's Explore interface. After setting the datasource to Loki, all the log labels become available, and can be easily filtered using [Loki's LogQL query language](https://grafana.com/docs/loki/latest/logql/). For example, after selecting the compose project/service under Log labels , errors can be filtered with the following expression: ``` -{compose-project="grafana-integration"} |= "error" +{compose_project="grafana-integration"} |= "error" ``` which will list the redis timeout events. @@ -48,7 +48,7 @@ This example includes a dashboard that contains a log panel for the selected ser There are also panels to display the ratio/percentage of errors in the current timeframe. -Additionally, there are graphs for each service, visualing the rate of the requests and showing latency percentiles. +Additionally, there are graphs for each service, visualizing the rate of the requests and showing latency percentiles. ### Clean up diff --git a/examples/grafana-integration/docker-compose.yaml b/examples/grafana-integration/docker-compose.yaml index d83fab69f9c..da9f8605980 100644 --- a/examples/grafana-integration/docker-compose.yaml +++ b/examples/grafana-integration/docker-compose.yaml @@ -7,7 +7,7 @@ services: - '3000:3000' volumes: - ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml - - ./grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml + - ./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yml - ./grafana/hotrod_metrics_logs.json:/etc/grafana/provisioning/dashboards/hotrod_metrics_logs.json logging: driver: loki From 92f670be622f8795cafed32c0cb49edd321c4c08 Mon Sep 17 00:00:00 2001 From: Ashmita Date: Mon, 1 Feb 2021 04:28:37 +1100 Subject: [PATCH 2/3] Github action for jaeger packages and docker image (#2740) * - Build docker images for jaeger components - Build tar file for jaeger components Signed-off-by: Ashmita Bohara * Add action for release Signed-off-by: Ashmita Bohara * Set DEPLOY as true for package binary script Signed-off-by: Ashmita Bohara * Fix BRANCH env variable for release event Signed-off-by: Ashmita Bohara * Feedbacks Signed-off-by: Ashmita Bohara * Fix BRANCH for release Signed-off-by: Ashmita Bohara * Feedbacks Signed-off-by: Ashmita Bohara --- .github/actions/setup-branch/action.yml | 2 +- .github/workflows/ci-build-binaries.yml | 28 ++++++++ .github/workflows/ci-docker-build.yml | 53 +++++++++++++++ .github/workflows/ci-release.yml | 75 ++++++++++++++++++++++ scripts/travis/package-deploy.sh | 6 -- scripts/travis/upload-all-docker-images.sh | 14 ++-- 6 files changed, 162 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/ci-build-binaries.yml create mode 100644 .github/workflows/ci-docker-build.yml create mode 100644 .github/workflows/ci-release.yml diff --git a/.github/actions/setup-branch/action.yml b/.github/actions/setup-branch/action.yml index 7dae9376873..e47c0d15aa8 100644 --- a/.github/actions/setup-branch/action.yml +++ b/.github/actions/setup-branch/action.yml @@ -10,7 +10,7 @@ runs: pull_request) BRANCH=${GITHUB_HEAD_REF} ;; - push) + push | release) BRANCH=${GITHUB_REF##*/} ;; esac diff --git a/.github/workflows/ci-build-binaries.yml b/.github/workflows/ci-build-binaries.yml new file mode 100644 index 00000000000..c3441180fa0 --- /dev/null +++ b/.github/workflows/ci-build-binaries.yml @@ -0,0 +1,28 @@ +name: Build binaries + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-binaries: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - uses: actions/setup-go@v2 + with: + go-version: ^1.15 + + - name: Export BRANCH variable + uses: ./.github/actions/setup-branch + + - name: Install tools + run: make install-ci + + - name: Build binaries + run: make build-all-platforms diff --git a/.github/workflows/ci-docker-build.yml b/.github/workflows/ci-docker-build.yml new file mode 100644 index 00000000000..5a8692c3e52 --- /dev/null +++ b/.github/workflows/ci-docker-build.yml @@ -0,0 +1,53 @@ +name: Build docker images + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + docker-images: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Fetch git tags + run: | + git fetch --prune --unshallow --tags + + - uses: actions/setup-go@v2 + with: + go-version: ^1.15 + + - uses: actions/setup-node@v2-beta + with: + node-version: '10' + + - uses: docker/login-action@v1 + id: dockerhub-login + with: + username: jaegertracingbot + password: ${{ secrets.DOCKERHUB_TOKEN }} + env: + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + if: env.DOCKERHUB_TOKEN != null + + - name: Export DOCKERHUB_LOGIN variable + run: | + echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV + if: steps.dockerhub-login.outcome == 'success' + + - name: Export BRANCH variable + uses: ./.github/actions/setup-branch + + - name: Install tools + run: make install-ci + + - name: Build docker images + run: make docker + + - name: Upload docker images + run: bash scripts/travis/upload-all-docker-images.sh diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml new file mode 100644 index 00000000000..b4b9affff1b --- /dev/null +++ b/.github/workflows/ci-release.yml @@ -0,0 +1,75 @@ +name: Publish release + +on: + release: + types: + - published + +jobs: + publish-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Fetch git tags + run: | + git fetch --prune --unshallow --tags + + - uses: actions/setup-go@v2 + with: + go-version: ^1.15 + + - uses: actions/setup-node@v2-beta + with: + node-version: '10' + + - uses: docker/login-action@v1 + id: dockerhub-login + with: + username: jaegertracingbot + password: ${{ secrets.DOCKERHUB_TOKEN }} + env: + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + if: env.DOCKERHUB_TOKEN != null + + - name: Export DOCKERHUB_LOGIN variable + run: | + echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV + if: steps.dockerhub-login.outcome == 'success' + + - name: Export BRANCH variable + uses: ./.github/actions/setup-branch + + - name: Install tools + run: make install-ci + + - name: Build binaries + id: build-binaries + run: make build-all-platforms + + - name: Package binaries + id: package-binaries + run: bash scripts/travis/package-deploy.sh + if: steps.build-binaries.outcome == 'success' + + - name: Upload binaries + uses: svenstaro/upload-release-action@v2 + with: + file: deploy/*.tar.gz + file_glob: true + tag: ${{ github.ref }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + if: steps.package-binaries.outcome == 'success' + + - name: Build docker images + id: build-images + run: make docker + + - name: Upload docker images + run: bash scripts/travis/upload-all-docker-images.sh + if: steps.build-images.outcome == 'success' + + - name: Build, test, and publish all-in-one image + run: bash scripts/travis/build-all-in-one-image.sh diff --git a/scripts/travis/package-deploy.sh b/scripts/travis/package-deploy.sh index 2bed8213843..e0e22540bad 100755 --- a/scripts/travis/package-deploy.sh +++ b/scripts/travis/package-deploy.sh @@ -46,12 +46,6 @@ function package { rm -rf $PACKAGE_STAGING_DIR } -# script start -if [ "$DEPLOY" != true ]; then - echo "Skipping the packaging of binaries as \$DEPLOY was not true." - exit 0 -fi - set -e DEPLOY_STAGING_DIR=./deploy-staging diff --git a/scripts/travis/upload-all-docker-images.sh b/scripts/travis/upload-all-docker-images.sh index 8273b950a1f..2fc33892c61 100755 --- a/scripts/travis/upload-all-docker-images.sh +++ b/scripts/travis/upload-all-docker-images.sh @@ -1,18 +1,14 @@ #!/bin/bash -# this script should only be run after build-docker-images.sh +# this script expects all docker images to be already built, it only uploads them to Docker Hub -set -e +set -euxf -o pipefail BRANCH=${BRANCH:?'missing BRANCH env var'} +DOCKERHUB_LOGIN=${DOCKERHUB_LOGIN:-false} -if [[ "$TRAVIS_SECURE_ENV_VARS" == "false" ]]; then - echo "skip docker upload, TRAVIS_SECURE_ENV_VARS=$TRAVIS_SECURE_ENV_VARS" - exit 0 -fi - -# Only push images to Docker Hub for master branch or for release tags vM.N.P -if [[ "$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then +# Only push images to Docker Hub for master branch or for release tags vM.N.P and when dockerhub login is done +if [[ ("$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$) && "$DOCKERHUB_LOGIN" == "true" ]]; then echo "upload to Docker Hub, BRANCH=$BRANCH" else echo 'skip Docker upload, only allowed for tagged releases or master (latest tag)' From 391051b625d363e0c33d9591f508f62ec60a938c Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 31 Jan 2021 12:42:44 -0500 Subject: [PATCH 3/3] Rearrange badges --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8d23ad5c0a0..e8e9579b2b3 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@ -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1273/badge)](https://bestpractices.coreinfrastructure.org/projects/1273) -[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#performance) +[![Gitter chat][gitter-img]][gitter] +[![Project+Community stats][community-badge]][community-stats] [![OpenTracing-1.0][ot-badge]](https://opentracing.io) +[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#performance) +[![Unit Tests][ci-img]][ci] +[![Coverage Status][cov-img]][cov] +[![FOSSA Status][fossa-img]][ci] +[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1273/badge)](https://bestpractices.coreinfrastructure.org/projects/1273) -[![Gitter chat][gitter-img]][gitter] [![Project+Community stats][community-badge]][community-stats] - -[![Unit Tests][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![FOSSA Status][fossa-img]][ci] - - + # Jaeger - a Distributed Tracing System