File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Publishes extend-nodejs-wrapper-and-exporter-{arch} to engservicessandbox us-east-1 as a PRIVATE layer.
3+ # Prereqs:
4+ # - AWS_PROFILE set to engservicessandbox (or SSO-logged-in) w/ lambda:PublishLayerVersion
5+ # - coralogix/opentelemetry-js-contrib cloned as sibling at ../opentelemetry-js-contrib (coralogix-autoinstrumentation branch)
6+ # - Run from repo root
7+
8+ set -euo pipefail
9+
10+ ARCH=" ${1:- arm64} "
11+ REGION=" us-east-1"
12+ LAYER_NAME=" extend-nodejs-wrapper-and-exporter-sandbox-${ARCH} "
13+
14+ case " $ARCH " in
15+ amd64) AWS_ARCH=" x86_64" ;;
16+ arm64) AWS_ARCH=" arm64" ;;
17+ * ) echo " unsupported arch: $ARCH " ; exit 1 ;;
18+ esac
19+
20+ echo " ==> building collector ($ARCH )"
21+ make -C collector package-extend GOARCH=" $ARCH "
22+
23+ echo " ==> building nodejs layer"
24+ ./ci-scripts/build_nodejs_layer.sh
25+
26+ echo " ==> merging zips"
27+ rm -rf build-sandbox && mkdir -p build-sandbox/out
28+ unzip -o " collector/build/opentelemetry-collector-layer-${ARCH} .zip" -d build-sandbox/out/
29+ unzip -o nodejs/packages/layer/build/layer.zip -d build-sandbox/out/
30+ (cd build-sandbox/out && zip -r ../layer.zip .)
31+
32+ echo " ==> publishing to $REGION "
33+ aws lambda publish-layer-version \
34+ --layer-name " $LAYER_NAME " \
35+ --license-info " Apache 2.0" \
36+ --compatible-architectures " $AWS_ARCH " \
37+ --compatible-runtimes nodejs22.x nodejs24.x \
38+ --zip-file fileb://build-sandbox/layer.zip \
39+ --region " $REGION " \
40+ --query ' LayerVersionArn' --output text
You can’t perform that action at this time.
0 commit comments