Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker login issue with all-in-one build #2668

Merged
merged 2 commits into from
Nov 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions scripts/travis/upload-to-docker.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -euxf -o pipefail

BRANCH=${BRANCH:?'missing BRANCH env var'}
IMAGE="${REPO:?'missing REPO env var'}:latest"
Expand All @@ -15,8 +15,7 @@ elif [[ $BRANCH =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
TAG=${major}.${minor}.${patch}
echo "BRANCH is a release tag: major=$major, minor=$minor, patch=$patch"
else
# TODO why do we do /// ?
TAG="${BRANCH///}"
TAG="${BRANCH}"
fi
echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, REPO=$REPO, BRANCH=$BRANCH, TAG=$TAG, IMAGE=$IMAGE"

Expand All @@ -31,15 +30,6 @@ if [[ -n $major ]]; then
fi
yurishkuro marked this conversation as resolved.
Show resolved Hide resolved
fi

if [[ -f $HOME/.docker/config.json ]]; then
rm -f $HOME/.docker/config.json
else
echo "$HOME/.docker/config.json doesn't exist"
fi

# Do not enable echo before the `docker login` command to avoid revealing the password.
set -x
docker login docker.io -u $DOCKER_USER -p $DOCKER_PASS
Ashmita152 marked this conversation as resolved.
Show resolved Hide resolved
if [[ "${REPO}" == "jaegertracing/jaeger-opentelemetry-collector" || "${REPO}" == "jaegertracing/jaeger-opentelemetry-agent" || "${REPO}" == "jaegertracing/jaeger-opentelemetry-ingester" || "${REPO}" == "jaegertracing/opentelemetry-all-in-one" ]]; then
# TODO remove once Jaeger OTEL collector is stable
docker push $REPO:latest
Expand Down