Skip to content

Commit

Permalink
chore: allow beta deployments in lean fashion
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Nov 27, 2024
1 parent 66c9984 commit a0be9dd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ jobs:
echo "latest_feature_name=$LATEST_FEATURE_NAME"
echo "commit_feature_name=$COMMIT_FEATURE_NAME"
exit 1
deploy-latest:
name: Deploy BETA/BugBash Feature
uses: ./.github/workflows/deploy.yml
Expand Down
52 changes: 27 additions & 25 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jobs:
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
BUGSNAG_RELEASE_STAGE: ${{ inputs.bugsnag_release_stage }}
run: |
npm run build:browser
npm run build:browser:modern
# npm run build:browser
npm run build:browser:modern -- --projects=@rudderstack/analytics-js-plugins,@rudderstack/analytics-js
- name: Sync Adobe Analytics assets to S3
if: ${{ inputs.environment == 'production' }}
Expand All @@ -137,40 +137,40 @@ jobs:
integration_sdks_html_file="list.html"
plugins_html_file="list.html"
# Generate a zip file of all the integrations
tmp_file="/tmp/legacy_$integration_sdks_zip_file"
tar -czvf "$tmp_file" -C "$integration_sdks_path_prefix/legacy/js-integrations/" .
mv "$tmp_file" "$integration_sdks_path_prefix/legacy/js-integrations/$integration_sdks_zip_file"
# # Generate a zip file of all the integrations
# tmp_file="/tmp/legacy_$integration_sdks_zip_file"
# tar -czvf "$tmp_file" -C "$integration_sdks_path_prefix/legacy/js-integrations/" .
# mv "$tmp_file" "$integration_sdks_path_prefix/legacy/js-integrations/$integration_sdks_zip_file"
tmp_file="/tmp/modern_$integration_sdks_zip_file"
tar -czvf "$tmp_file" -C "$integration_sdks_path_prefix/modern/js-integrations/" .
mv "$tmp_file" "$integration_sdks_path_prefix/modern/js-integrations/$integration_sdks_zip_file"
# tmp_file="/tmp/modern_$integration_sdks_zip_file"
# tar -czvf "$tmp_file" -C "$integration_sdks_path_prefix/modern/js-integrations/" .
# mv "$tmp_file" "$integration_sdks_path_prefix/modern/js-integrations/$integration_sdks_zip_file"
# Generate a zip file of all the plugins
tmp_file="/tmp/$plugins_zip_file"
tar -czvf "$tmp_file" -C $plugins_path_prefix/modern/plugins/ .
mv "$tmp_file" "$plugins_path_prefix/modern/plugins/$plugins_zip_file"
# # Generate a zip file of all the plugins
# tmp_file="/tmp/$plugins_zip_file"
# tar -czvf "$tmp_file" -C $plugins_path_prefix/modern/plugins/ .
# mv "$tmp_file" "$plugins_path_prefix/modern/plugins/$plugins_zip_file"
# Upload all the files to S3
aws s3 cp $core_sdk_path_prefix/legacy/iife/ $s3_path_prefix/legacy/ $copy_args
aws s3 cp $integration_sdks_path_prefix/legacy/js-integrations/ $s3_path_prefix/legacy/js-integrations/ $copy_args
# aws s3 cp $core_sdk_path_prefix/legacy/iife/ $s3_path_prefix/legacy/ $copy_args
# aws s3 cp $integration_sdks_path_prefix/legacy/js-integrations/ $s3_path_prefix/legacy/js-integrations/ $copy_args
aws s3 cp $core_sdk_path_prefix/modern/iife/ $s3_path_prefix/modern/ $copy_args
aws s3 cp $plugins_path_prefix/modern/plugins/ $s3_path_prefix/modern/plugins/ $copy_args
aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/ $s3_path_prefix/modern/js-integrations/ $copy_args
# aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/ $s3_path_prefix/modern/js-integrations/ $copy_args
# Generate the HTML file to list all the integrations
./scripts/list-sdk-components.sh ${{ secrets.AWS_S3_BUCKET_NAME }} ${{ inputs.s3_dir_path }}/legacy/js-integrations $integration_sdks_html_file $integration_sdks_path_prefix/legacy/js-integrations "Device Mode Integrations" $integration_sdks_zip_file
# # Generate the HTML file to list all the integrations
# ./scripts/list-sdk-components.sh ${{ secrets.AWS_S3_BUCKET_NAME }} ${{ inputs.s3_dir_path }}/legacy/js-integrations $integration_sdks_html_file $integration_sdks_path_prefix/legacy/js-integrations "Device Mode Integrations" $integration_sdks_zip_file
./scripts/list-sdk-components.sh ${{ secrets.AWS_S3_BUCKET_NAME }} ${{ inputs.s3_dir_path }}/modern/js-integrations $integration_sdks_html_file $integration_sdks_path_prefix/modern/js-integrations "Device Mode Integrations" $integration_sdks_zip_file
# ./scripts/list-sdk-components.sh ${{ secrets.AWS_S3_BUCKET_NAME }} ${{ inputs.s3_dir_path }}/modern/js-integrations $integration_sdks_html_file $integration_sdks_path_prefix/modern/js-integrations "Device Mode Integrations" $integration_sdks_zip_file
# Generate the HTML file to list all the plugins
./scripts/list-sdk-components.sh ${{ secrets.AWS_S3_BUCKET_NAME }} ${{ inputs.s3_dir_path }}/modern/plugins $plugins_html_file $plugins_path_prefix/modern/plugins "Plugins" $plugins_zip_file
# # Generate the HTML file to list all the plugins
# ./scripts/list-sdk-components.sh ${{ secrets.AWS_S3_BUCKET_NAME }} ${{ inputs.s3_dir_path }}/modern/plugins $plugins_html_file $plugins_path_prefix/modern/plugins "Plugins" $plugins_zip_file
# Copy the HTML files to S3
aws s3 cp $integration_sdks_path_prefix/legacy/js-integrations/$integration_sdks_html_file $s3_path_prefix/legacy/js-integrations/$integration_sdks_html_file --cache-control ${{ env.CACHE_CONTROL }}
aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/$integration_sdks_html_file $s3_path_prefix/modern/js-integrations/$integration_sdks_html_file --cache-control ${{ env.CACHE_CONTROL }}
aws s3 cp $plugins_path_prefix/modern/plugins/$plugins_html_file $s3_path_prefix/modern/plugins/$plugins_html_file --cache-control ${{ env.CACHE_CONTROL }}
# # Copy the HTML files to S3
# aws s3 cp $integration_sdks_path_prefix/legacy/js-integrations/$integration_sdks_html_file $s3_path_prefix/legacy/js-integrations/$integration_sdks_html_file --cache-control ${{ env.CACHE_CONTROL }}
# aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/$integration_sdks_html_file $s3_path_prefix/modern/js-integrations/$integration_sdks_html_file --cache-control ${{ env.CACHE_CONTROL }}
# aws s3 cp $plugins_path_prefix/modern/plugins/$plugins_html_file $s3_path_prefix/modern/plugins/$plugins_html_file --cache-control ${{ env.CACHE_CONTROL }}
- name: Create Cloudfront invalidation
run: |
Expand Down Expand Up @@ -264,6 +264,7 @@ jobs:
# Below steps are for v1.1 SDK (legacy)

- name: Sync files to S3 v1.1 directory
if: ${{ inputs.environment == 'production' }}
run: |
core_sdk_path_prefix="packages/analytics-v1.1/dist/cdn"
integration_sdks_path_prefix="packages/analytics-js-integrations/dist/cdn"
Expand All @@ -277,6 +278,7 @@ jobs:
aws s3 cp $integration_sdks_path_prefix/modern/js-integrations/ $s3_path_prefix/modern/js-integrations/ $copy_args
- name: Create Cloudfront invalidation
if: ${{ inputs.environment == 'production' }}
run: |
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/${{ inputs.s3_dir_path_legacy }}*"
Expand Down

0 comments on commit a0be9dd

Please sign in to comment.