@@ -7,35 +7,29 @@ cd "$KOKORO_ARTIFACTS_DIR/git/serverless/functions-framework-nodejs"
77# ## Configure Airlock
88# APT
99rm -f /etc/apt/sources.list.d/* /etc/apt/sources.list
10- echo ' deb https://us-apt.pkg.dev/remote/artifact-foundry-prod/debian-3p-remote-bookworm bookworm main' | \
11- tee -a /etc/apt/sources.list.d/artifact-registry.list
10+ echo ' deb https://us-apt.pkg.dev/remote/artifact-foundry-prod/debian-3p-remote-bookworm bookworm main' |
11+ tee -a /etc/apt/sources.list.d/artifact-registry.list
1212
1313# NPM
14- cat > .npmrc << EOF
14+ cat > .npmrc << EOF
1515registry=https://us-npm.pkg.dev/artifact-foundry-prod/npm-3p-trusted/
1616//us-npm.pkg.dev/artifact-foundry-prod/npm-3p-trusted/:always-auth=true
1717EOF
1818cp .npmrc " $HOME /.npmrc"
1919
20- # ## Build all package.json
20+ # ## Build root package
2121ARTIFACTS=" ${KOKORO_ARTIFACTS_DIR} /artifacts"
22- mkdir " ${ARTIFACTS} "
23-
24- readarray -t package_jsons < <( find " ." -type d -name " node_modules" -prune -o -name " package.json" -print)
25- for package_file in " ${package_jsons[@]} " ; do
26- echo " Building package ${package_file} "
27- package_dir=" $( dirname " ${package_file} " ) "
28- pushd " ${package_dir} "
29- npm ci
30- # npm pack and npm publish needs to be distinct steps to ensure the
31- # artifacts will be stored locally for attestation generation.
32- npm pack --pack-destination=" ${ARTIFACTS} "
33- popd
34- done
22+ mkdir -p " ${ARTIFACTS} "
23+
24+ echo " Building root package"
25+ npm ci
26+ # npm pack and npm publish needs to be distinct steps to ensure the
27+ # artifacts will be stored locally for attestation generation.
28+ npm pack --pack-destination=" ${ARTIFACTS} "
3529
3630# ## Authenticate to OSS Exit Gate
3731# Replace default registry with OSS Exit Gate
38- cat > .npmrc << EOF
32+ cat > .npmrc << EOF
3933registry=https://us-npm.pkg.dev/oss-exit-gate-prod/ff-releases--npm/
4034//us-npm.pkg.dev/oss-exit-gate-prod/ff-releases--npm/:always-auth=true
4135EOF
0 commit comments