Skip to content

Commit

Permalink
Publish a docker image containing Java autoinstrumentation files. (#475)
Browse files Browse the repository at this point in the history
* Publish a docker image containing Java autoinstrumentation files.

* Push to anuraaga temporarily

* Push to open-telemetry

* Allow yaml files for autoinstrumentation to be grouped together

* Add reference to java instrumentation version for use in operator

* Quay
  • Loading branch information
anuraaga committed Nov 3, 2021
1 parent eb307e6 commit 9e16767
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish-autoinstrumentation-java.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Publish Java Auto-Instrumentation"

on:
push:
paths:
- 'autoinstrumentation/java/**'
- '.github/workflows/publish-autoinstrumentation-java.yaml'
branches:
- main
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2.3.5

- name: Read version
run: echo "VERSION=$(cat autoinstrumentation/java/version.txt)" >> $GITHUB_ENV

- name: Docker meta
id: meta
uses: docker/metadata-action@v3.6.0
with:
images: quay.io/opentelemetry/opentelemetry-operator-autoinstrumentation-java
tags: |
type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }}
- name: Login to Quay
uses: docker/login-action@v1.10.0
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2.7.0
with:
context: autoinstrumentation/java
push: true
build-args: version=${{ env.VERSION }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
5 changes: 5 additions & 0 deletions autoinstrumentation/java/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM busybox

ARG version

ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /javaagent.jar
1 change: 1 addition & 0 deletions autoinstrumentation/java/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.7.0
4 changes: 4 additions & 0 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ operator=0.37.1

# Represents the current release of the Target Allocator.
targetallocator=0.1.0

# Represents the current release of Java instrumentation.
# Should match autoinstrumentation/java/version.txt
autoinstrumentation-java=1.7.0

0 comments on commit 9e16767

Please sign in to comment.