diff --git a/.github/workflows/all-in-one-build.yml b/.github/workflows/all-in-one-build.yml new file mode 100644 index 00000000000..14cc9c6c93c --- /dev/null +++ b/.github/workflows/all-in-one-build.yml @@ -0,0 +1,57 @@ +name: Build all-in-one + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + all-in-one: + 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 for pull_request event + run: | + echo "BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV + if: github.event_name == 'pull_request' + + - name: Export BRANCH variable for push event + run: | + echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV + if: github.event_name == 'push' + + - name: Install tools + run: make install-ci + + - name: Build, test, and publish all-in-one image + run: bash scripts/travis/build-all-in-one-image.sh diff --git a/.github/workflows/es-integration-tests.yml b/.github/workflows/es-integration-tests.yml index d36b0704947..92768daed06 100644 --- a/.github/workflows/es-integration-tests.yml +++ b/.github/workflows/es-integration-tests.yml @@ -16,5 +16,8 @@ jobs: with: go-version: ^1.15 + - name: Install tools + run: make install-ci + - name: Run elasticsearch integration tests run: bash scripts/travis/es-integration-test.sh diff --git a/RELEASE.md b/RELEASE.md index 81ced8142f7..b9e390ee6a3 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,7 +16,7 @@ * Title "Release X.Y.Z" * Tag `vX.Y.Z` (note the `v` prefix) and choose appropriate branch * Copy the new CHANGELOG.md section into the release notes -4. The release tag will trigger a build of the docker images +4. The release tag will trigger a build of the docker images. Since forks don't have jaegertracingbot dockerhub token, they can never publish images to jaegertracing organisation. 5. Once the images are available on [Docker Hub](https://hub.docker.com/r/jaegertracing/), announce the release on the mailing list, gitter, and twitter. 6. Publish documentation for the new version in [jaegertracing.io](https://github.com/jaegertracing/documentation). diff --git a/scripts/travis/build-all-in-one-image.sh b/scripts/travis/build-all-in-one-image.sh index 46492a387d8..aae4eecf19e 100755 --- a/scripts/travis/build-all-in-one-image.sh +++ b/scripts/travis/build-all-in-one-image.sh @@ -8,8 +8,16 @@ BRANCH=${BRANCH:?'missing BRANCH env var'} # `GOARCH= ./scripts/travis/build-all-in-one-image.sh`. GOARCH=${GOARCH:-$(go env GOARCH)} -source ~/.nvm/nvm.sh -nvm use 10 +expected_version="v10" +version=$(node --version) +major_version=${version%.*.*} +if [ "$major_version" = "$expected_version" ] ; then + echo "Node version is as expected: $version" +else + echo "ERROR: installed Node version $version doesn't match expected version $expected_version" + exit 1 +fi + make build-ui set +e @@ -28,7 +36,7 @@ run_integration_test() { upload_to_docker() { # Only push the docker container to Docker Hub for master branch - if [[ ("$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$) && "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then + if [[ ("$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$) && "DOCKERHUB_LOGIN" == "true" ]]; then echo "upload $1 to Docker Hub" export REPO=$1 bash ./scripts/travis/upload-to-docker.sh @@ -38,6 +46,7 @@ upload_to_docker() { } make build-all-in-one GOOS=linux GOARCH=$GOARCH +make create-baseimg-debugimg repo=jaegertracing/all-in-one docker build -f cmd/all-in-one/Dockerfile \ --target release \ diff --git a/scripts/travis/es-integration-test.sh b/scripts/travis/es-integration-test.sh index 4abeb4435df..fd9a3af3841 100755 --- a/scripts/travis/es-integration-test.sh +++ b/scripts/travis/es-integration-test.sh @@ -26,7 +26,7 @@ if [ "$ES_OTEL_INTEGRATION_TEST" == true ]; then exit 0 fi -echo "Executing token propatagion test" +echo "Executing token propagation test" # Mock UI, needed only for build query service. make build-crossdock-ui-placeholder