From 838085cbae73d82e69b905b40a702ff18644f485 Mon Sep 17 00:00:00 2001 From: Johan Gunnarsson Date: Mon, 1 Aug 2022 19:52:30 +0200 Subject: [PATCH] Add build-boot-with-aws-batch and build-debian-with-aws-batch --- scripts/build-boot-with-aws-batch | 18 ++++++++++++++++++ scripts/build-debian-with-aws-batch | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 scripts/build-boot-with-aws-batch create mode 100755 scripts/build-debian-with-aws-batch diff --git a/scripts/build-boot-with-aws-batch b/scripts/build-boot-with-aws-batch new file mode 100755 index 0000000..1132cf0 --- /dev/null +++ b/scripts/build-boot-with-aws-batch @@ -0,0 +1,18 @@ +#!/bin/sh +# Build one boot image as part of a AWS Batch array job + +ARRAY_S3_URI_BASE="${1}" # For example "s3://bucket/folder" +ARTIFACTS_S3_URI_BASE="${2}" # For example "s3://bucket/folder" + +set -ex + +# Download parameters for this run +aws s3 cp "${ARRAY_S3_URI_BASE}/${AWS_BATCH_JOB_ARRAY_INDEX}" args + +# Source parameters +. args + +build-boot "${BOARD_ID}" "${CHIP_ID}" "${DEFCONFIG}" "${TUPLE}" + +# Upload artifacts from this run +aws s3 cp "${ARTIFACTS_DIR:-/artifacts}" "${ARTIFACTS_S3_URI_BASE}" --recursive diff --git a/scripts/build-debian-with-aws-batch b/scripts/build-debian-with-aws-batch new file mode 100755 index 0000000..46dbcc7 --- /dev/null +++ b/scripts/build-debian-with-aws-batch @@ -0,0 +1,18 @@ +#!/bin/sh +# Build one debian image as part of a AWS Batch array job + +ARRAY_S3_URI_BASE="${1}" # For example "s3://bucket/folder" +ARTIFACTS_S3_URI_BASE="${2}" # For example "s3://bucket/folder" + +set -ex + +# Download parameters for this run +aws s3 cp "${ARRAY_S3_URI_BASE}/${AWS_BATCH_JOB_ARRAY_INDEX}" args + +# Source parameters +. args + +build-debian "${OS}" "${ARCH}" "${DIST}" + +# Upload artifacts from this run +aws s3 cp "${ARTIFACTS_DIR:-/artifacts}" "${ARTIFACTS_S3_URI_BASE}" --recursive