Skip to content
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
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- setup_build_environment
- run: echo "Releasing version" && ./gradlew printVersion
- run: ./gradlew publish
- run: DOCKER_TAG=${CIRCLE_TAG} make docker docker-push
- run:
name: "Copy artifacts to workspace"
command: |
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
DOCKER_IMAGE ?= hypertrace/javaagent
DOCKER_TAG ?= latest

.PHONY: assemble
assemble:
./gradlew assemble --stacktrace

.PHONY: build
build:
Expand All @@ -13,6 +19,14 @@ muzzle:
# for injecting helper classes from the same packages as instrumentations
./gradlew muzzle --no-daemon

.PHONY: docker
docker: assemble
docker build -f javaagent/Dockerfile javaagent/ -t ${DOCKER_IMAGE}:${DOCKER_TAG}

.PHONY: docker-push
docker-push:
docker push ${DOCKER_IMAGE}:${DOCKER_TAG}

.PHONY: test
test:
./gradlew check
Expand Down
18 changes: 18 additions & 0 deletions javaagent/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is a dockerfile that contains the Hypertrace javaagent.
# This image can be used to get the javaagent into app images or
# as Kubernetes init container to copy the javaagent into the volume mounted into the
# application container.

FROM hypertrace/java:11

LABEL maintainer="Hypertrace 'https://www.hypertrace.org/'"

ENV JAVAAGENT=/opt/hypertrace/hypertrace-agent-all.jar
COPY build/libs/hypertrace-agent-*-all.jar ${JAVAAGENT}

# The following binaries are used by sidecar injector
# This statement tests if they exists in the image
RUN which base64

# env vars are not interpreted
CMD ["/opt/hypertrace/hypertrace-agent-all.jar"]