Skip to content

Commit

Permalink
fix packaging of the layer artifacts (#993)
Browse files Browse the repository at this point in the history
The current logic is including the full path of the
`aws-opentelemetry-javaagent.jar` in the zip. But it should be at the
root along-with the `otel-instrument` file.

Tested locally and verified the directory structure is now correct.


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
  • Loading branch information
srprash authored Jan 10, 2025
1 parent 2c9c260 commit 31eb106
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lambda-layer/build-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ echo "Info: Building ADOT Lambda Java SDK Layer Code"
echo "Info: Creating the layer artifact"
mkdir -p "$SOURCEDIR"/build/distributions/
cp "$SOURCEDIR"/build/javaagent/aws-opentelemetry-agent*.jar "$SOURCEDIR"/build/distributions/aws-opentelemetry-javaagent.jar
zip -r ./build/distributions/aws-opentelemetry-java-layer.zip "$SOURCEDIR"/build/distributions/aws-opentelemetry-javaagent.jar otel-instrument
cp otel-instrument "$SOURCEDIR"/build/distributions/otel-instrument
pushd "$SOURCEDIR"/build/distributions
zip -r aws-opentelemetry-java-layer.zip aws-opentelemetry-javaagent.jar otel-instrument
popd

## Cleanup
# revert the patch applied since it is only needed while building the layer.
Expand Down

0 comments on commit 31eb106

Please sign in to comment.