Skip to content

Commit

Permalink
Add Dockerfile for OTEL collector and publish latest tag (#2167)
Browse files Browse the repository at this point in the history
* Add Dockerfile for OTEL collector and publish latest tag

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Remove line

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* no cache for the certs

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
  • Loading branch information
pavolloffay authored Apr 6, 2020
1 parent b8f6ac1 commit 7ee7073
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
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

0 comments on commit 7ee7073

Please sign in to comment.