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

Add Dockerfile for OTEL collector and publish latest tag #2167

Merged
merged 3 commits into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ else
endif

.PHONY: build-otel-collector
build-otel-collector:
build-otel-collector: elasticsearch-mappings
ifeq ($(GOARCH), s390x)
cd ${OTEL_COLLECTOR_DIR} && $(GOBUILD) -o ./opentelemetry-collector-$(GOOS)-$(GOARCH) $(BUILD_INFO) main.go
else
Expand Down Expand Up @@ -310,7 +310,7 @@ docker-images-elastic:

.PHONY: docker-images-jaeger-backend
docker-images-jaeger-backend:
for component in agent collector query ingester ; do \
for component in agent collector query ingester opentelemetry-collector ; do \
docker build -t $(DOCKER_NAMESPACE)/jaeger-$$component:${DOCKER_TAG} cmd/$$component ; \
echo "Finished building $$component ==============" ; \
done
Expand Down
8 changes: 8 additions & 0 deletions cmd/opentelemetry-collector/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM alpine:latest as certs
RUN apk add --update --no-cache ca-certificates

FROM scratch
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

COPY opentelemetry-collector-linux /go/bin/
ENTRYPOINT ["/go/bin/opentelemetry-collector-linux"]
2 changes: 1 addition & 1 deletion scripts/travis/upload-all-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
fi

export DOCKER_NAMESPACE=jaegertracing
for component in agent cassandra-schema es-index-cleaner es-rollover collector query ingester tracegen
for component in agent cassandra-schema es-index-cleaner es-rollover collector query ingester tracegen opentelemetry-collector
do
export REPO="jaegertracing/jaeger-${component}"
bash ./scripts/travis/upload-to-docker.sh
Expand Down
9 changes: 7 additions & 2 deletions scripts/travis/upload-to-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ fi
# Do not enable echo before the `docker login` command to avoid revealing the password.
set -x
docker login -u $DOCKER_USER -p $DOCKER_PASS
# push all tags, therefore push to repo
docker push $REPO
if [[ "${REPO}" == "jaegertracing/jaeger-opentelemetry-collector" ]]; then
# TODO remove once Jaeger OTEL collector is stable
docker push $REPO:latest
else
# push all tags, therefore push to repo
docker push $REPO
fi

SNAPSHOT_IMAGE="$REPO-snapshot:$TRAVIS_COMMIT"
echo "Pushing snapshot image $SNAPSHOT_IMAGE"
Expand Down