Skip to content

Commit e17a37b

Browse files
authored
Build platform binaries as part of CI (#1909)
* Build platform binaries as part of CI Signed-off-by: Yuri Shkuro <ys@uber.com> * Separate steps more Signed-off-by: Yuri Shkuro <ys@uber.com>
1 parent f68ece0 commit e17a37b

File tree

3 files changed

+34
-23
lines changed

3 files changed

+34
-23
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ script:
7979
- if [ "$TESTS" == true ]; then make test-ci ; else echo 'skipping tests'; fi
8080
- if [ "$ALL_IN_ONE" == true ]; then bash ./scripts/travis/build-all-in-one-image.sh ; else echo 'skipping all_in_one'; fi
8181
- if [ "$CROSSDOCK" == true ]; then bash ./scripts/travis/build-crossdock.sh ; else echo 'skipping crossdock'; fi
82-
- if [ "$DOCKER" == true ]; then bash ./scripts/travis/build-docker-images.sh ; else echo 'skipping docker images'; fi
82+
- if [ "$DOCKER" == true ]; then bash ./scripts/travis/build-docker-images.sh ; else echo 'skipping build-docker-images'; fi
83+
- if [ "$DEPLOY" == true ]; then make build-all-platforms ; else echo 'skipping build-all-platforms'; fi
8384
- if [ "$ES_INTEGRATION_TEST" == true ]; then bash ./scripts/travis/es-integration-test.sh ; else echo 'skipping elastic search integration test'; fi
8485
- if [ "$KAFKA_INTEGRATION_TEST" == true ]; then bash ./scripts/travis/kafka-integration-test.sh ; else echo 'skipping kafka integration test'; fi
8586
- if [ "$CASSANDRA_INTEGRATION_TEST" == true ]; then bash ./scripts/travis/cassandra-integration-test.sh ; else echo 'skipping cassandra integration test'; fi
@@ -94,7 +95,8 @@ after_failure:
9495
- if [ "$CROSSDOCK" == true ]; then make crossdock-logs ; else echo 'skipping crossdock'; fi
9596

9697
before_deploy:
97-
- if [ "$DEPLOY" == true ]; then make build-all-platforms && bash ./scripts/travis/package-deploy.sh ; else echo 'skipping deploy'; fi
98+
- if [ "$DOCKER" == true ]; then bash ./scripts/travis/upload-all-docker-images.sh ; else echo 'skipping docker upload'; fi
99+
- if [ "$DEPLOY" == true ]; then bash ./scripts/travis/package-deploy.sh ; else echo 'skipping deploying binaries'; fi
98100

99101
deploy:
100102
provider: releases
Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,12 @@
11
#!/bin/bash
2+
#
3+
# Build UI and all Docker images
24

35
set -e
46

5-
if [[ "$TRAVIS_SECURE_ENV_VARS" == "false" ]]; then
6-
echo "skip docker upload, TRAVIS_SECURE_ENV_VARS=$TRAVIS_SECURE_ENV_VARS"
7-
exit 0
8-
fi
9-
10-
BRANCH=${BRANCH:?'missing BRANCH env var'}
11-
12-
# Only push images to Docker Hub for master branch or for release tags vM.N.P
13-
if [[ "$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
14-
echo "upload to Docker Hub, BRANCH=$BRANCH"
15-
else
16-
echo 'skip Docker upload, only allowed for tagged releases or master (latest tag)'
17-
exit 0
18-
fi
19-
7+
# TODO avoid building the UI when on a PR branch: https://github.com/jaegertracing/jaeger/issues/1908
208
source ~/.nvm/nvm.sh
219
nvm use 10
2210

2311
export DOCKER_NAMESPACE=jaegertracing
2412
make docker
25-
26-
for component in agent cassandra-schema es-index-cleaner es-rollover collector query ingester
27-
do
28-
export REPO="jaegertracing/jaeger-${component}"
29-
bash ./scripts/travis/upload-to-docker.sh
30-
done
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# this script should only be run after build-docker-images.sh
4+
5+
set -e
6+
7+
BRANCH=${BRANCH:?'missing BRANCH env var'}
8+
9+
if [[ "$TRAVIS_SECURE_ENV_VARS" == "false" ]]; then
10+
echo "skip docker upload, TRAVIS_SECURE_ENV_VARS=$TRAVIS_SECURE_ENV_VARS"
11+
exit 0
12+
fi
13+
14+
# Only push images to Docker Hub for master branch or for release tags vM.N.P
15+
if [[ "$BRANCH" == "master" || $BRANCH =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
16+
echo "upload to Docker Hub, BRANCH=$BRANCH"
17+
else
18+
echo 'skip Docker upload, only allowed for tagged releases or master (latest tag)'
19+
exit 0
20+
fi
21+
22+
export DOCKER_NAMESPACE=jaegertracing
23+
for component in agent cassandra-schema es-index-cleaner es-rollover collector query ingester
24+
do
25+
export REPO="jaegertracing/jaeger-${component}"
26+
bash ./scripts/travis/upload-to-docker.sh
27+
done

0 commit comments

Comments
 (0)