Skip to content

Commit b1fe914

Browse files
committed
Add EFS Purge check to buildspecs.
1 parent 45f22e4 commit b1fe914

8 files changed

Lines changed: 40 additions & 2 deletions

File tree

source-repo/kas/build.buildspec.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ phases:
1313
commands:
1414
- chown -R yoctouser /sstate-cache
1515
- chown -R yoctouser /downloads
16+
- chmod 755 /sstate-cache
17+
- chmod 755 /downloads
18+
- |
19+
if [[ -n "$PURGE_EFS" ]] ; then
20+
echo "Starting EFS purge."
21+
rm -rvf /downloads/*
22+
rm -rvf /sstate-cache/*
23+
fi
1624
build:
1725
commands:
1826
- echo Build started on `date`

source-repo/meta-aws-demo/build.buildspec.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ phases:
1515
- chown -R yoctouser /downloads
1616
- chmod 755 /sstate-cache
1717
- chmod 755 /downloads
18+
- |
19+
if [[ -n "$PURGE_EFS" ]] ; then
20+
echo "Starting EFS purge."
21+
rm -rvf /downloads/*
22+
rm -rvf /sstate-cache/*
23+
fi
1824
build:
1925
commands:
2026
- git clone https://github.com/aws4embeddedlinux/meta-aws-demos -b v0.0.1

source-repo/nxp-imx/build.buildspec.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ phases:
1515
- chown -R yoctouser /downloads
1616
- chmod 755 /sstate-cache
1717
- chmod 755 /downloads
18+
- |
19+
if [[ -n "$PURGE_EFS" ]] ; then
20+
echo "Starting EFS purge."
21+
rm -rvf /downloads/*
22+
rm -rvf /sstate-cache/*
23+
fi
1824
build:
1925
commands:
2026
- echo Build started on `date`

source-repo/poky-ami/build.buildspec.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ phases:
1515
- chown -R yoctouser /downloads
1616
- chmod 755 /sstate-cache
1717
- chmod 755 /downloads
18+
- |
19+
if [[ -n "$PURGE_EFS" ]] ; then
20+
echo "Starting EFS purge."
21+
rm -rvf /downloads/*
22+
rm -rvf /sstate-cache/*
23+
fi
1824
build:
1925
commands:
2026
- echo Build started on `date`

source-repo/poky/build.buildspec.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ phases:
1515
- chown -R yoctouser /downloads
1616
- chmod 755 /sstate-cache
1717
- chmod 755 /downloads
18+
- |
19+
if [[ -n "$PURGE_EFS" ]] ; then
20+
echo "Starting EFS purge."
21+
rm -rvf /downloads/*
22+
rm -rvf /sstate-cache/*
23+
fi
1824
build:
1925
commands:
2026
- echo Build started on `date`

source-repo/renesas/build.buildspec.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ phases:
1616
- chmod 755 /sstate-cache
1717
- chmod 755 /downloads
1818
- chmod 755 build.sh
19+
- |
20+
if [[ -n "$PURGE_EFS" ]] ; then
21+
echo "Starting EFS purge."
22+
rm -rvf /downloads/*
23+
rm -rvf /sstate-cache/*
24+
fi
1925
build:
2026
commands:
2127
# BB_ENV_EXTRAWHITE is still used in Dunfell release and was renamed afterwards to BB_ENV_PASSTHROUGH_ADDITIONS

test/__snapshots__/embedded-linux-pipeline.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6959,7 +6959,7 @@ def handler(event, context):
69596959
"BranchName": "main",
69606960
"S3": {
69616961
"Bucket": "cdk-hnb659fds-assets-12341234-eu-central-1",
6962-
"Key": "7d314040c3b712e8f4a6fe344b865c6d51d6d3470218790947a0f5a9f7e04326.zip",
6962+
"Key": "03d16bf861cb657df931bd33404567ac7f02ff927d18a45f5cc7f7cc981bb7ce.zip",
69636963
},
69646964
},
69656965
"RepositoryName": "layer-repo-MyTestStack",

test/__snapshots__/source-repo.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports[`Pipeline Source Repository Snapshot 1`] = `
1616
"BranchName": "main",
1717
"S3": {
1818
"Bucket": "cdk-hnb659fds-assets-12341234-eu-central-1",
19-
"Key": "7d314040c3b712e8f4a6fe344b865c6d51d6d3470218790947a0f5a9f7e04326.zip",
19+
"Key": "03d16bf861cb657df931bd33404567ac7f02ff927d18a45f5cc7f7cc981bb7ce.zip",
2020
},
2121
},
2222
"RepositoryName": "charlie",

0 commit comments

Comments
 (0)