Skip to content

Commit 31eb106

Browse files
authored
fix packaging of the layer artifacts (aws-observability#993)
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.
1 parent 2c9c260 commit 31eb106

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lambda-layer/build-layer.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ echo "Info: Building ADOT Lambda Java SDK Layer Code"
4949
echo "Info: Creating the layer artifact"
5050
mkdir -p "$SOURCEDIR"/build/distributions/
5151
cp "$SOURCEDIR"/build/javaagent/aws-opentelemetry-agent*.jar "$SOURCEDIR"/build/distributions/aws-opentelemetry-javaagent.jar
52-
zip -r ./build/distributions/aws-opentelemetry-java-layer.zip "$SOURCEDIR"/build/distributions/aws-opentelemetry-javaagent.jar otel-instrument
52+
cp otel-instrument "$SOURCEDIR"/build/distributions/otel-instrument
53+
pushd "$SOURCEDIR"/build/distributions
54+
zip -r aws-opentelemetry-java-layer.zip aws-opentelemetry-javaagent.jar otel-instrument
55+
popd
5356

5457
## Cleanup
5558
# revert the patch applied since it is only needed while building the layer.

0 commit comments

Comments
 (0)