Skip to content

Commit

Permalink
Merge pull request #376 from awslabs/chore/template-updates
Browse files Browse the repository at this point in the history
chore: one-click template updates
  • Loading branch information
malachi-constant authored Nov 6, 2023
2 parents 362a694 + f6456b2 commit a6a10fc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gh-sync-cc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ jobs:
cp CHANGELOG.md scene-intelligence-with-rosbag-on-aws/
cp .viperlightignore scene-intelligence-with-rosbag-on-aws/
cp .bandit scene-intelligence-with-rosbag-on-aws/
cp -r .github scene-intelligence-with-rosbag-on-aws/
cp scene-intelligence-with-rosbag-on-aws-create.template deployment/
cp scene-intelligence-with-rosbag-on-aws-delete.template deployment/
cp -R deployment scene-intelligence-with-rosbag-on-aws/
cd scene-intelligence-with-rosbag-on-aws/
git config --global user.email "${{github.actor}}@users.noreply.github.com"
Expand Down
14 changes: 8 additions & 6 deletions deployment/build-s3-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ echo "Staring to build distribution"
# export deployment_dir=`pwd`
# export dist_dir="$deployment_dir"
export dist_dir="deployment"
export create_template="deployment/scene-intelligence-with-rosbag-on-aws-create.template"
export delete_template="deployment/scene-intelligence-with-rosbag-on-aws-delete.template"
template_dist_dir="$dist_dir/global-s3-assets"
opensrc_dist_dir="$dist_dir/open-source"
build_dist_dir="$dist_dir/regional-s3-assets"
Expand Down Expand Up @@ -55,13 +57,13 @@ echo "In deployment folder"
pwd

echo "Replacing solution bucket in the template"
cp -f "deployment/scene-intelligence-with-rosbag-on-aws-create.template" $template_dist_dir
cp -f "deployment/scene-intelligence-with-rosbag-on-aws-delete.template" $template_dist_dir
cp -f $create_template $template_dist_dir
cp -f $delete_template $template_dist_dir

echo "Placeholder: Pushing single click CFN stack into build_dist_dir to make it non-empty. Empty dirs are being ignored in Codepipeline and failing to execute the deployAssets stage"
cp -f "deployment/scene-intelligence-with-rosbag-on-aws-create.template" $build_dist_dir
cp -f "deployment/scene-intelligence-with-rosbag-on-aws-delete.template" $build_dist_dir
cp -f $create_template $build_dist_dir
cp -f $delete_template $build_dist_dir

echo "Placeholder: Pushing single click CFN stack into opensrc_dist_dir to make it non-empty. Empty dirs are being ignored in Codepipeline and failing to execute the deployAssets stage"
cp -f "deployment/scene-intelligence-with-rosbag-on-aws-create.template" $opensrc_dist_dir
cp -f "deployment/scene-intelligence-with-rosbag-on-aws-delete.template" $opensrc_dist_dir
cp -f $create_template $opensrc_dist_dir
cp -f $delete_template $opensrc_dist_dir
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
AWSTemplateFormatVersion: 2010-09-09
Description: (SO0279) Creates Scene Intelligence with Rosbag on AWS. Version v1.0.0
Parameters:
SolutionVersion:
Type: String
Default: v1.0.0
Description: Solution Version. Should reference version tag e.g v1.0.0
Resources:
CodeBuildRole:
Type: AWS::IAM::Role
Expand Down Expand Up @@ -253,6 +258,8 @@ Resources:
Value: !Sub '${AWS::Region}'
- Name: ROLE_ARN
Value: !Sub '${CodeBuildRole.Arn}'
- NAME: SOLUTION_VERSION
Value: !Ref SolutionVersion
- Name: url_path
Value: 'placeholder'
- Name: url_query
Expand Down Expand Up @@ -285,7 +292,7 @@ Resources:
commands:
- echo Build started on `date`
- echo 'Cloning ADDF repo...'
- git clone -b scene-intelligence-with-rosbag-on-aws https://github.com/awslabs/autonomous-driving-data-framework.git
- git clone -b ${SOLUTION_VERSION} https://github.com/awslabs/autonomous-driving-data-framework.git
- echo 'Cloning complete'
- cd autonomous-driving-data-framework/
- echo 'Installing dependencies...'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
AWSTemplateFormatVersion: 2010-09-09
Description: (SO0279-D) Deletes Scene Intelligence with Rosbag on AWS. Version v1.0.0
Parameters:
SolutionVersion:
Type: String
Default: v1.0.0
Description: Solution Version. Should reference version tag e.g v1.0.0
Resources:
CodeBuildRole:
Type: AWS::IAM::Role
Expand Down Expand Up @@ -253,6 +258,8 @@ Resources:
Value: !Sub '${AWS::Region}'
- Name: ROLE_ARN
Value: !Sub '${CodeBuildRole.Arn}'
- NAME: SOLUTION_VERSION
Value: !Ref SolutionVersion
- Name: url_path
Value: 'placeholder'
- Name: url_query
Expand Down Expand Up @@ -284,7 +291,7 @@ Resources:
commands:
- echo Build started on `date`
- echo 'Cloning ADDF repo...'
- git clone -b scene-intelligence-with-rosbag-on-aws https://github.com/awslabs/autonomous-driving-data-framework.git
- git clone -b ${SOLUTION_VERSION} https://github.com/awslabs/autonomous-driving-data-framework.git
- echo 'Cloning complete'
- cd autonomous-driving-data-framework/
- echo 'Installing dependencies...'
Expand Down

0 comments on commit a6a10fc

Please sign in to comment.