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

Ensure the compatibility of modifications to the RocketMQ Java client code with OpenTelemetry instrumentation #438

Merged
merged 1 commit into from
Apr 1, 2023
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
56 changes: 55 additions & 1 deletion .github/workflows/java_build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Java Build
on:
on:
workflow_call:
jobs:
build:
Expand All @@ -21,3 +21,57 @@ jobs:
- name: Build with Maven
working-directory: ./java
run: mvn -B package --file pom.xml

opentelemetry-instrumentation-compatibility:
runs-on: ubuntu-latest
steps:
- name: Checkout Current Repository
uses: actions/checkout@v2
# Use JDK 17.
- name: Use JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: "adopt"
# Build the code of the current repository, skipping tests and code style checks.
- name: Build Current Repository
working-directory: ./java
run: mvn clean install -DskipTests -Dcheckstyle.skip -Dspotbugs.skip=true
# Get the version of the current repository.
- name: Get Current Version
id: get_version
working-directory: ./java
run: echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
# Check the latest release tag of opentelemetry.
- name: Check Latest Release Tag
id: get_release_tag
run: |
curl --silent "https://api.github.com/repos/open-telemetry/opentelemetry-java-instrumentation/releases/latest" \
| grep '"tag_name":' \
| sed -E 's/.*"([^"]+)".*/\1/' \
| xargs echo "::set-output name=tag_name::"
# Clone the opentelemetry-java-instrumentation repository.
- name: Checkout Latest Release
uses: actions/checkout@v2
with:
repository: open-telemetry/opentelemetry-java-instrumentation
ref: ${{ steps.get_release_tag.outputs.tag_name }}
# Print the current version.
- name: Print Current Version
run: |
echo "Current Version: ${{ steps.get_version.outputs.version }}"
# Replace the RocketMQ client version.
- name: Replace RocketMQ Client Version
run: |
sed -i 's/org\.apache\.rocketmq:rocketmq-client-java:[^"]*/org.apache.rocketmq:rocketmq-client-java:${{ steps.get_version.outputs.version }}/' instrumentation/rocketmq/rocketmq-client/rocketmq-client-5.0/testing/build.gradle.kts
# Use JDK 17.
- name: Use JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: "adopt"
cache: gradle
# Build the rocketmq opentelemetry test.
- name: Build OpenTelemetry Instrumentation Test
run: |
./gradlew :instrumentation:rocketmq:rocketmq-client:rocketmq-client-5.0:javaagent:test -i