Skip to content

Commit c92fc06

Browse files
committed
Merge branch 'develop'
2 parents 9e5941e + 895fd54 commit c92fc06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2721
-847
lines changed
File renamed without changes.

.github/scripts/load_cache.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Downloads and extracts cache archive from S3.
44
#
55
# Expects the following environment variables to already exist:
6-
# * ARTIFACT_USER_AWS_PROFILE: the profile to use when issuing AWS CLI commands
76
# * AWS_CACHE_BUCKET: the S3 bucket in which to obtain the archive
87
# * HOME: executing user's home directory
98
#
@@ -13,13 +12,16 @@
1312
# Example usage:
1413
# . /path/to/plrust/.github/scripts/load_cache.sh
1514
# loadcache "some-cache-key-abc123"
15+
#
16+
# Note: This assumes the host in which this script is running on has the ability
17+
# to read and write from the bucket specified by AWS_CACHE_BUCKET
1618

1719
function loadcache() {
1820
local cache_key="$1"
1921

2022
echo "Checking to see if cache archive exists: $cache_key"
2123

22-
if aws s3api head-object --profile $ARTIFACT_USER_AWS_PROFILE --bucket $AWS_CACHE_BUCKET --key $cache_key &> /dev/null; then
24+
if aws s3api head-object --bucket $AWS_CACHE_BUCKET --key $cache_key &> /dev/null; then
2325
echo "Cache archive exists for $cache_key -- downloading and extracting now."
2426

2527
mkdir -p $HOME/artifacts/
@@ -28,7 +30,6 @@ function loadcache() {
2830
echo "Downloadng archive $cache_key and storing to $archive_path"
2931

3032
aws s3api get-object \
31-
--profile $ARTIFACT_USER_AWS_PROFILE \
3233
--bucket $AWS_CACHE_BUCKET \
3334
--key $cache_key \
3435
$archive_path

.github/scripts/save_cache.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Creates cache archive and uploads to S3.
44
#
55
# Expects the following environment variables to already exist:
6-
# * ARTIFACT_USER_AWS_PROFILE: the profile to use when issuing AWS CLI commands
76
# * AWS_CACHE_BUCKET: the S3 bucket in which to obtain the archive
87
# * HOME: executing user's home directory
98
#
@@ -15,6 +14,9 @@
1514
# . /path/to/plrust/.github/scripts/save_cache.sh
1615
# my_paths=(/path/one /path/two /path/three)
1716
# savecache "some-cache-key-abc123" "${my_paths[@]}"
17+
#
18+
# Note: This assumes the host in which this script is running on has the ability
19+
# to read and write from the bucket specified by AWS_CACHE_BUCKET
1820

1921
function savecache() {
2022
local cache_key="$1"
@@ -23,7 +25,7 @@ function savecache() {
2325

2426
echo "Checking to see if cache archive exists: $cache_key"
2527

26-
if aws s3api head-object --profile $ARTIFACT_USER_AWS_PROFILE --bucket $AWS_CACHE_BUCKET --key $cache_key &> /dev/null; then
28+
if aws s3api head-object --bucket $AWS_CACHE_BUCKET --key $cache_key &> /dev/null; then
2729
echo "Cache archive exists for $cache_key -- skipping archive creation."
2830
else
2931
echo "Cache archive does not exist for $cache_key -- creating archive now."
@@ -38,7 +40,6 @@ function savecache() {
3840
echo "Created archive $archive_path -- uploading now"
3941

4042
aws s3api put-object \
41-
--profile $ARTIFACT_USER_AWS_PROFILE \
4243
--bucket $AWS_CACHE_BUCKET \
4344
--key $cache_key \
4445
--body $archive_path

0 commit comments

Comments
 (0)