Skip to content

Commit

Permalink
Release 0.3.1
Browse files Browse the repository at this point in the history
### Bug Fixes

* Modify build and packaging for AWS SQS Lambda (f02e211)

Change-Id: I0c29795bbb1f5e602d3cf841278754b2eda22de7
GitOrigin-RevId: 85bc66bbdbebfeecc3d9a054c4be42240c2aa55c
  • Loading branch information
Privacy Sandbox Team authored and pmeric committed Sep 20, 2022
1 parent ca3801d commit aca1e99
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

### [0.3.1](https://github.com/privacysandbox/fledge-key-value-service/compare/release-0.3.0...release-0.3.1) (2022-09-20)


### Bug Fixes

* Modify build and packaging for AWS SQS Lambda (f02e211)

## [0.3.0](https://github.com/privacysandbox/fledge-key-value-service/compare/release-0.2.0...release-0.3.0) (2022-09-14)


Expand Down
1 change: 1 addition & 0 deletions components/aws/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ container_image(
layers = [
":lambda_binary_layer",
],
visibility = ["//production/packaging:__subpackages__"],
)

container_push(
Expand Down
1 change: 1 addition & 0 deletions components/aws/proxy/source/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ cc_binary(
"-std=c++17",
],
linkopts = ["-pthread"],
visibility = ["//production/packaging:__subpackages__"],
deps = [
":proxy_lib",
],
Expand Down
9 changes: 7 additions & 2 deletions components/aws/push_sqs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ if [[ -z "${AWS_ECR}" ]]; then
fi

aws ecr get-login-password --region us-east-1 |
docker login --username AWS --password-stdin ${AWS_ECR}
docker login --username AWS --password-stdin ${AWS_ECR}

AWS_ECR=${AWS_ECR} bazel run //components/aws:sqs_lambda_push_aws_ecr
WORKSPACE=$(git rev-parse --show-toplevel)
DIST_DIR="${WORKSPACE}"/dist
unzip -cq "${DIST_DIR}"/aws_artifacts.zip sqs_lambda.tar | docker load -i /dev/stdin
AWS_IMAGE_URI="${AWS_ECR}"/sqs_lambda:latest
docker tag bazel/components/aws:sqs_lambda "${AWS_IMAGE_URI}"
docker push "${AWS_IMAGE_URI}"
12 changes: 12 additions & 0 deletions production/packaging/aws/data_server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ load(
"pkg_files",
)
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load("@rules_pkg//pkg:zip.bzl", "pkg_zip")
load("//builders/amazonlinux2:nitro.bzl", "nitro_enclave_image")

pkg_files(
Expand Down Expand Up @@ -103,3 +104,14 @@ nitro_enclave_image(
],
target_eif_basename = "server_enclave_image",
)

# aws artifacts
pkg_zip(
name = "aws_artifacts",
srcs = [
":server_enclave_image.eif",
":server_enclave_image.json",
"//components/aws:sqs_lambda.tar",
"//components/aws/proxy/source:proxy",
],
)
15 changes: 6 additions & 9 deletions production/packaging/build_and_test_all
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,19 @@ if [[ ${PRESUBMIT} -eq 1 ]]; then
fi

printf "==== build AWS Nitro image =====\n"
AWS_TARGETS="//production/packaging/aws/data_server:server_enclave_image //components/aws/proxy/source:proxy //components/aws:sqs_lambda.tar"
AWS_TARGETS="//production/packaging/aws/data_server:aws_artifacts"
if [[ -n ${AWS_TARGETS} ]]; then
${BAZEL_CMD} build ${BAZEL_EXTRA_ARGS} ${AWS_TARGETS}
fi

WORKSPACE=$(${BAZEL_CMD} info workspace)

DIST=${WORKSPACE}/dist
mkdir -p ${DIST}
chmod 770 ${DIST}
DIST="${WORKSPACE}"/dist
mkdir -p "${DIST}"
chmod 770 "${DIST}"

cp -p bazel-bin/production/packaging/aws/data_server/*.{eif,json} ${DIST}
cp -p bazel-bin/components/aws/proxy/source/proxy ${DIST}
cp components/aws/push_sqs ${DIST}
chmod 644 ${DIST}/server_enclave_image.{eif,json} ${DIST}/proxy
chmod 755 ${DIST}/push_sqs
cp -p bazel-bin/production/packaging/aws/data_server/aws_artifacts.zip components/aws/push_sqs "${DIST}"
chmod 755 "${DIST}"/push_sqs

printf "To push a newer version of SQS lambda, run ${DIST}/push_sqs\n"

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.3.1

0 comments on commit aca1e99

Please sign in to comment.