Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: separation prs for ut and dt dedicated deployment updates #3936

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/prepare-for-prod-dt-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prepare for DT Production Environment Deployment

Check warning on line 1 in .github/workflows/prepare-for-prod-dt-deploy.yml

View workflow job for this annotation

GitHub Actions / Check for formatting & lint errors

File ignored by default.

on:
push:
Expand Down Expand Up @@ -159,29 +159,29 @@

cd customer-objects

declare -a enabled_ut_customers=()
declare -a enabled_dt_customers=()
declare -a sub_directories=('enterprise-us' 'enterprise-eu')

# identify the customers enabled in sub-directories
for directory in "${sub_directories[@]}"; do
for f in "./$directory"/*; do
[[ -f $f ]] || continue

enabled="$(yq e '.spec.user_transformer.enabled' $f)"
enabled="$(yq e '.spec.transformer.enabled' $f)"
if [ $enabled == "true" ]; then
enabled_ut_customers+=( $f )
enabled_dt_customers+=( $f )
fi
done
done

# bump up the customers version and repository information
for customer in "${enabled_ut_customers[@]}"; do
yq eval -i ".spec.user_transformer.image.version=\"$TAG_NAME\"" $customer
yq eval -i ".spec.user_transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" $customer
for customer in "${enabled_dt_customers[@]}"; do
yq eval -i ".spec.transformer.image.version=\"$TAG_NAME\"" $customer
yq eval -i ".spec.transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" $customer
git add $customer
done

git commit -m "chore: upgrade dedicated transformers to $TAG_NAME"
git commit -m "chore: upgrade dedicated dt transformers to $TAG_NAME"
git push -u origin dedicated-transformer-$TAG_NAME

gh pr create --fill
38 changes: 38 additions & 0 deletions .github/workflows/prepare-for-prod-ut-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prepare for UT Production Environment Deployment

Check warning on line 1 in .github/workflows/prepare-for-prod-ut-deploy.yml

View workflow job for this annotation

GitHub Actions / Check for formatting & lint errors

File ignored by default.

on:
push:
Expand Down Expand Up @@ -29,6 +29,7 @@
if: ((startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true)
outputs:
tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }}
tag_name: ${{ steps.gen_tag_names.outputs.tag_name }}
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down Expand Up @@ -71,6 +72,7 @@
needs: [generate-tag-names, build-user-transformer-image]
env:
UT_TAG_NAME: ${{ needs.generate-tag-names.outputs.tag_name_ut }}
TAG_NAME: ${{ needs.generate-tag-names.outputs.tag_name }}
TF_IMAGE_REPOSITORY: rudderstack/rudder-transformer
steps:
- name: Checkout
Expand Down Expand Up @@ -134,3 +136,39 @@
git push -u origin hosted-user-transformer-$UT_TAG_NAME

gh pr create --fill

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether DM team wants to track these every release - otherwise PR's are gonna be in hanging state cc: @Jayachand

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user-transformers have special needs to put on dedicated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we can move the production UT deployment to a manual trigger rather than on merge to main(current state). @Jayachand any thoughts here ? Will there be any repurcussions due to this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we saying to deploy UT to production customers ( shared ones ) as well through a manual trigger ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only move production UT deployment to a manual trigger.

- name: Update helm charts and raise pull request for enterprise customers on dedicated transformers
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
cd rudder-devops
git checkout -b dedicated-user-transformer-$TAG_NAME

cd customer-objects

declare -a enabled_ut_customers=()
declare -a sub_directories=('enterprise-us' 'enterprise-eu')

# identify the customers enabled in sub-directories
for directory in "${sub_directories[@]}"; do
for f in "./$directory"/*; do
[[ -f $f ]] || continue

enabled="$(yq e '.spec.user_transformer.enabled' $f)"
if [ $enabled == "true" ]; then
enabled_ut_customers+=( $f )
fi
done
done

# bump up the customers version and repository information
for customer in "${enabled_ut_customers[@]}"; do
yq eval -i ".spec.user_transformer.image.version=\"$TAG_NAME\"" $customer
yq eval -i ".spec.user_transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" $customer
git add $customer
done

git commit -m "chore: upgrade dedicated user transformers to $TAG_NAME"
git push -u origin dedicated-user-transformer-$TAG_NAME

gh pr create --fill
Loading