File tree Expand file tree Collapse file tree 33 files changed +41
-70
lines changed Expand file tree Collapse file tree 33 files changed +41
-70
lines changed Original file line number Diff line number Diff line change 1
1
node_modules
2
+ npm-debug.log
2
3
package-lock.json
3
4
package
4
- out.yml
5
+ * out.yml
5
6
out.json
6
7
bucket-name.txt
7
8
target
8
9
build
9
10
.gradle
10
11
* .zip
12
+ bin
13
+ obj
Original file line number Diff line number Diff line change @@ -3,5 +3,3 @@ BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \
3
3
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
4
4
echo $BUCKET_NAME > bucket-name.txt
5
5
aws s3 mb s3://$BUCKET_NAME
6
- cp 2-deploy.sh.template 2-deploy.sh
7
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 2-deploy.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
3
4
TEMPLATE=template.yml
4
5
if [ $1 ]
5
6
then
11
12
else
12
13
gradle build -i
13
14
fi
14
- aws cloudformation package --template-file $TEMPLATE --s3-bucket MY_BUCKET --output-template-file out.yml
15
+ aws cloudformation package --template-file $TEMPLATE --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
15
16
aws cloudformation deploy --template-file out.yml --stack-name blank-java --capabilities CAPABILITY_NAMED_IAM
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ if [ -f bucket-name.txt ]; then
13
13
esac
14
14
done
15
15
fi
16
- rm -f 2-deploy.sh out.yml out.json
16
+ rm -f out.yml out.json
17
17
rm -rf build .gradle target
Original file line number Diff line number Diff line change @@ -3,5 +3,3 @@ BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \
3
3
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
4
4
echo $BUCKET_NAME > bucket-name.txt
5
5
aws s3 mb s3://$BUCKET_NAME
6
- cp 2-deploy.sh.template 2-deploy.sh
7
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 2-deploy.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eo pipefail
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
4
+ cd function
5
+ rm -rf package
6
+ pip install --target ./package -r requirements.txt
7
+ cp lambda_function.py package
8
+ cd ../
9
+ aws cloudformation package --template-file template.yml --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
10
+ aws cloudformation deploy --template-file out.yml --stack-name blank-python --capabilities CAPABILITY_NAMED_IAM
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ if [ -f bucket-name.txt ]; then
13
13
esac
14
14
done
15
15
fi
16
- rm -f 2-deploy.sh out.yml out.json
16
+ rm -f out.yml out.json
17
17
rm -rf function/package
Original file line number Diff line number Diff line change @@ -3,5 +3,3 @@ BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \
3
3
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
4
4
echo $BUCKET_NAME > bucket-name.txt
5
5
aws s3 mb s3://$BUCKET_NAME
6
- cp 2-deploy.sh.template 2-deploy.sh
7
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 2-deploy.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
- aws cloudformation package --template-file template.yml --s3-bucket MY_BUCKET --output-template-file out.yml
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
4
+ aws cloudformation package --template-file template.yml --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
4
5
aws cloudformation deploy --template-file out.yml --stack-name blank-ruby --capabilities CAPABILITY_NAMED_IAM
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ if [ -f bucket-name.txt ]; then
13
13
esac
14
14
done
15
15
fi
16
- rm -f 2-deploy.sh out.yml out.json
16
+ rm -f out.yml out.json
17
17
rm -rf function/node_modules function/package-lock.json
Original file line number Diff line number Diff line change @@ -3,5 +3,3 @@ BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \
3
3
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
4
4
echo $BUCKET_NAME > bucket-name.txt
5
5
aws s3 mb s3://$BUCKET_NAME
6
- cp 2-deploy.sh.template 2-deploy.sh
7
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 2-deploy.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
3
4
cd function
4
5
npm install --production
5
6
cd ../
6
- aws cloudformation package --template-file template.yml --s3-bucket MY_BUCKET --output-template-file out.yml
7
+ aws cloudformation package --template-file template.yml --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
7
8
aws cloudformation deploy --template-file out.yml --stack-name blank --capabilities CAPABILITY_NAMED_IAM
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ if [ -f bucket-name.txt ]; then
13
13
esac
14
14
done
15
15
fi
16
- rm -f 2-deploy.sh out.yml out.json
16
+ rm -f out.yml out.json
17
17
rm -rf function/node_modules function/package-lock.json
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,5 +3,3 @@ BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \
3
3
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
4
4
echo $BUCKET_NAME > bucket-name.txt
5
5
aws s3 mb s3://$BUCKET_NAME
6
- cp 2-deploy.sh.template 2-deploy.sh
7
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 2-deploy.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
3
4
cd src/ec2spot
4
5
dotnet lambda package
5
6
cd ../../
6
- aws cloudformation package --template-file template.yml --s3-bucket MY_BUCKET --output-template-file out.yml
7
+ aws cloudformation package --template-file template.yml --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
7
8
aws cloudformation deploy --template-file out.yml --stack-name ec2-spot --capabilities CAPABILITY_NAMED_IAM
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ if [ -f bucket-name.txt ]; then
12
12
esac
13
13
done
14
14
fi
15
- rm -f 2-deploy.sh out.yml
15
+ rm -f out.yml out.json
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,5 +3,3 @@ BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \
3
3
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
4
4
echo $BUCKET_NAME > bucket-name.txt
5
5
aws s3 mb s3://$BUCKET_NAME
6
- cp 2-deploy.sh.template 2-deploy.sh
7
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 2-deploy.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
cd processor
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
3
4
npm install --production
4
5
cd ../random-error
5
6
npm install --production
6
7
cd ../
7
- aws cloudformation package --template-file template.yml --s3-bucket MY_BUCKET --output-template-file out.yml
8
+ aws cloudformation package --template-file template.yml --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
8
9
aws cloudformation deploy --template-file out.yml --stack-name error-processor --capabilities CAPABILITY_NAMED_IAM
Original file line number Diff line number Diff line change @@ -19,5 +19,5 @@ if [ -f bucket-name.txt ]; then
19
19
esac
20
20
done
21
21
fi
22
- rm -f 2-deploy.sh out.yml out.json
22
+ rm -f out.yml out.json
23
23
rm -rf processor/node_modules random-error/node_modules processor/package-lock.json random-error/package-lock.json
Original file line number Diff line number Diff line change @@ -3,5 +3,3 @@ BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \
3
3
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
4
4
echo $BUCKET_NAME > bucket-name.txt
5
5
aws s3 mb s3://$BUCKET_NAME
6
- cp 2-deploy.sh.template 2-deploy.sh
7
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 2-deploy.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
3
4
TEMPLATE=template.yml
4
5
if [ $1 ]
5
6
then
11
12
else
12
13
gradle build -i
13
14
fi
14
- aws cloudformation package --template-file $TEMPLATE --s3-bucket MY_BUCKET --output-template-file out.yml
15
+ aws cloudformation package --template-file $TEMPLATE --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
15
16
aws cloudformation deploy --template-file out.yml --stack-name java-basic --capabilities CAPABILITY_NAMED_IAM
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ if [ -f bucket-name.txt ]; then
13
13
esac
14
14
done
15
15
fi
16
- rm -f 2-deploy.sh out.yml out.json
16
+ rm -f out.yml out.json
17
17
rm -rf build .gradle target
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,5 +4,3 @@ BUCKET_ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \
4
4
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
5
5
echo $BUCKET_NAME > bucket-name.txt
6
6
aws s3 mb s3://$BUCKET_NAME
7
- cp 4-deploy.sh.template 4-deploy.sh
8
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 4-deploy.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
3
4
cd lib/nodejs && npm install && cd ../../
4
- aws cloudformation package --template-file template.yml --s3-bucket MY_BUCKET --output-template-file out.yml
5
+ aws cloudformation package --template-file template.yml --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
5
6
aws cloudformation deploy --template-file out.yml --stack-name list-manager --capabilities CAPABILITY_NAMED_IAM
Original file line number Diff line number Diff line change @@ -14,6 +14,5 @@ if [ -f bucket-name.txt ]; then
14
14
esac
15
15
done
16
16
fi
17
-
18
- rm out.yml out.json 4-deploy.sh
17
+ rm out.yml out.json
19
18
rm -rf lib/nodejs/node_modules
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,6 +3,4 @@ set -eo pipefail
3
3
BUCKET_ID=$( dd if=/dev/random bs=8 count=1 2> /dev/null | od -An -tx1 | tr -d ' \t\n' )
4
4
BUCKET_NAME=lambda-artifacts-$BUCKET_ID
5
5
echo $BUCKET_NAME > bucket-name.txt
6
- aws s3 mb s3://$BUCKET_NAME
7
- cp 4-deploy.sh.template 4-deploy.sh
8
- sed -i' ' -e " s/MY_BUCKET/$BUCKET_NAME /" 4-deploy.sh
6
+ aws s3 mb s3://$BUCKET_NAME
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eo pipefail
3
+ ARTIFACT_BUCKET=$( cat bucket-name.txt)
3
4
STACK=rds-mysql
4
5
if [[ $# -eq 1 ]] ; then
5
6
STACK=$1
6
7
echo " Deploying to stack $STACK "
7
8
fi
8
9
cd lib/nodejs && npm install && cd ../../
9
- aws cloudformation package --template-file template.yml --s3-bucket MY_BUCKET --output-template-file out.yml
10
+ aws cloudformation package --template-file template.yml --s3-bucket $ARTIFACT_BUCKET --output-template-file out.yml
10
11
aws cloudformation deploy --template-file out.yml --stack-name $STACK --capabilities CAPABILITY_NAMED_IAM
11
12
12
13
# attach to different VPC
Original file line number Diff line number Diff line change @@ -18,3 +18,5 @@ if [ -f bucket-name.txt ]; then
18
18
esac
19
19
done
20
20
fi
21
+
22
+ rm out.yml out.json
You can’t perform that action at this time.
0 commit comments