-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthew Ball
committed
Sep 29, 2020
1 parent
92b1cae
commit 3dced55
Showing
52 changed files
with
2,132 additions
and
16,628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
# | ||
# This assumes all of the OS-level configuration has been completed and git repo has already been cloned | ||
# | ||
# This script should be run from the repo's deployment directory | ||
# cd deployment | ||
# ./build-s3-dist.sh solution-name | ||
# | ||
# Paramenters: | ||
# - solution-name: name of the solution for consistency | ||
|
||
# Check to see if input has been provided: | ||
if [ -z "$1" ]; then | ||
echo "Please provide the trademark approved solution name for the open source package." | ||
echo "For example: ./build-s3-dist.sh trademarked-solution-name" | ||
exit 1 | ||
fi | ||
|
||
# Get reference for all important folders | ||
source_template_dir="$PWD" | ||
dist_dir="$source_template_dir/open-source" | ||
dist_template_dir="$dist_dir/deployment" | ||
source_dir="$source_template_dir/../source" | ||
|
||
echo "------------------------------------------------------------------------------" | ||
echo "[Init] Clean old open-source folder" | ||
echo "------------------------------------------------------------------------------" | ||
echo "rm -rf $dist_dir" | ||
rm -rf $dist_dir | ||
echo "mkdir -p $dist_dir" | ||
mkdir -p $dist_dir | ||
echo "mkdir -p $dist_template_dir" | ||
mkdir -p $dist_template_dir | ||
|
||
# echo "------------------------------------------------------------------------------" | ||
# echo "[Packing] Templates" | ||
# echo "------------------------------------------------------------------------------" | ||
# echo "cp $source_template_dir/cfn/templates/*.yaml $dist_template_dir/" | ||
# cp $source_template_dir/*.yaml $dist_template_dir/ | ||
# echo "copy yaml templates and rename" | ||
# cp $source_template_dir/*.yaml $dist_template_dir/ | ||
# cd $dist_template_dir | ||
# # aws cloudformation package --template-file "$template" --s3-bucket "$BUCKET" --s3-prefix "${project}/${version}" --output-template-file packaged.template | ||
|
||
# # Rename all *.yaml to *.template | ||
# for f in *.yaml; do | ||
# mv -- "$f" "${f%.yaml}.template" | ||
# done | ||
|
||
# echo "------------------------------------------------------------------------------" | ||
# echo "[Packing] Build Script" | ||
# echo "------------------------------------------------------------------------------" | ||
# echo "cp $source_template_dir/build-s3-dist.sh $dist_template_dir" | ||
# cp $source_template_dir/build-s3-dist.sh $dist_template_dir | ||
# echo "cp $source_template_dir/run-unit-tests.sh $dist_template_dir" | ||
# cp $source_template_dir/run-unit-tests.sh $dist_template_dir | ||
|
||
# echo "------------------------------------------------------------------------------" | ||
# echo "[Packing] Create GitHub (open-source) zip file" | ||
# echo "------------------------------------------------------------------------------" | ||
# echo "cd $dist_dir" | ||
# cd $dist_dir | ||
# echo "zip -q -r9 ../$1.zip *" | ||
# zip -q -r9 ../$1.zip * | ||
# echo "Clean up open-source folder" | ||
# echo "rm -rf *" | ||
# rm -rf * | ||
# echo "mv ../$1.zip ." | ||
# mv ../$1.zip . | ||
# echo "Completed building $1.zip dist" | ||
echo "installing handy little lib called gitzip to create a zip based on our .gitignore" | ||
npm i -g gitzip | ||
echo "moving to root to generate zip file" | ||
cd ../ | ||
echo "generating the zip using gitzip and ensuring exclusions are ignored as they do not need to be in GitHub" | ||
gitzip -d $dist_dir/$1.zip -x .taskcat.yml buildspec.yml .viperlight* aws-perspective-params.json taskcat-bucket-management.sh taskcat-buildspec.yaml |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.