Skip to content

Commit

Permalink
Merge pull request #78 from scheduleonce/technocrats/ONCEHUB-83405-team1
Browse files Browse the repository at this point in the history
feat: [team]oncehub-83405: updating transformer version to "1.69.1"
  • Loading branch information
so-abahadur authored Jun 27, 2024
2 parents 4abd8bc + 07556c6 commit 2c15d0c
Show file tree
Hide file tree
Showing 543 changed files with 69,386 additions and 89,975 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"off",
{ "cases": { "camelCase": true, "pascalCase": true, "kebabCase": true } }
],
"import/no-import-module-exports": "off",
"unicorn/no-instanceof-array": "error",
"unicorn/no-static-only-class": "error",
"unicorn/consistent-destructuring": "error",
Expand Down
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ updates:
directory: '/'
schedule:
interval: 'weekly'
- package-ecosystem: 'docker'
directory: '/'
schedule:
interval: 'daily'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ N/A

- [ ] Is the PR limited to one linear task?

- [ ] Are relevant unit and component test-cases added?
- [ ] Are relevant unit and component test-cases added in **new readability format**?

### Reviewer checklist

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- name: Checkout
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1

- name: Setup Docker Buildx
Expand Down Expand Up @@ -94,6 +95,7 @@ jobs:
- name: Checkout
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1

- name: Setup Docker Buildx
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dt-test-and-report-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
- name: Upload Coverage Reports to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: ./reports/coverage

Expand Down
43 changes: 39 additions & 4 deletions .github/workflows/prepare-for-prod-dt-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ jobs:
yq eval -i ".user-transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" multi-tenant/multi-tenant.yaml
git add multi-tenant/multi-tenant.yaml
cd ../../../../config-be-rudder-transformer
yq eval -i ".config-be-rudder-transformer.image.tag=\"$TAG_NAME\"" values.prod.yaml
yq eval -i ".config-be-rudder-transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" values.prod.yaml
git add values.prod.yaml
cd ../../../../config-be-rudder-transformer/environment/prod
yq eval -i ".config-be-rudder-transformer.image.tag=\"$TAG_NAME\"" base.yaml
git add base.yaml
git commit -m "chore: upgrade shared transformers to $TAG_NAME"
git push -u origin shared-transformer-$TAG_NAME
Expand All @@ -146,3 +145,39 @@ jobs:
git push -u origin hosted-transformer-$TAG_NAME
gh pr create --fill
- 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-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 transformers to $TAG_NAME"
git push -u origin dedicated-transformer-$TAG_NAME
gh pr create --fill
40 changes: 39 additions & 1 deletion .github/workflows/prepare-for-prod-rollback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ jobs:
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Clone Devops Repo
run: |
git clone https://${{secrets.PAT}}@github.com/rudderlabs/rudder-devops.git
- name: Update Helm Charts and Raise Pull Request
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
git clone https://${{secrets.PAT}}@github.com/rudderlabs/rudder-devops.git
cd rudder-devops
git checkout -b shared-transformer-rollback-${{ steps.target-version.outputs.tag_name }}
Expand All @@ -57,3 +60,38 @@ jobs:
git push -u origin shared-transformer-rollback-${{ steps.target-version.outputs.tag_name }}
gh pr create --fill
- 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-transformer-rollback-${{ steps.target-version.outputs.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=\"${{ steps.target-version.outputs.tag_name }}\"" $customer
git add $customer
done
git commit -m "chore: rollback dedicated transformers to ${{ steps.target-version.outputs.tag_name }}"
git push -u origin dedicated-transformer-rollback-${{ steps.target-version.outputs.tag_name }}
gh pr create --fill
7 changes: 3 additions & 4 deletions .github/workflows/prepare-for-prod-ut-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ jobs:
cd rudder-devops
git checkout -b shared-user-transformer-$UT_TAG_NAME
cd helm-charts/config-be-rudder-transformer
cd helm-charts/config-be-rudder-transformer/environment/prod
yq eval -i ".config-be-user-transformer.image.tag=\"$UT_TAG_NAME\"" values.prod.yaml
yq eval -i ".config-be-user-transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" values.prod.yaml
git add values.prod.yaml
yq eval -i ".config-be-user-transformer.image.tag=\"$UT_TAG_NAME\"" base.yaml
git add base.yaml
git commit -m "chore: upgrade shared user-transformers to $UT_TAG_NAME"
git push -u origin shared-user-transformer-$UT_TAG_NAME
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/prepare-for-staging-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
cd rudder-devops
BRANCH_NAME="shared-transformer-$TAG_NAME"
echo $BRANCH_NAME
if [ -n `git ls-remote --heads origin $BRANCH_NAME 2>/dev/null` ]
if [ -n "$(git ls-remote --heads origin $BRANCH_NAME 2>/dev/null)" ]
then
echo "Staging deployment branch already exists!"
else
Expand All @@ -116,10 +116,10 @@ jobs:
yq eval -i ".user-transformer.image.tag=\"$TAG_NAME\"" staging.yaml
git add staging.yaml
cd ../../../../config-be-rudder-transformer
yq eval -i ".config-be-rudder-transformer.image.tag=\"$TAG_NAME\"" values.staging.yaml
yq eval -i ".config-be-user-transformer.image.tag=\"$TAG_NAME\"" values.staging.yaml
git add values.staging.yaml
cd ../../../../config-be-rudder-transformer/environment/staging
yq eval -i ".config-be-rudder-transformer.image.tag=\"$TAG_NAME\"" base.yaml
yq eval -i ".config-be-user-transformer.image.tag=\"$TAG_NAME\"" base.yaml
git add base.yaml
git commit -m "chore: upgrade staging env transformers to \"$TAG_NAME\""
git push -u origin $BRANCH_NAME
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }}
payload: |
{
"text": "*<${{env.RELEASES_URL}}v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\nCC: <@U03KG4BK1L1> <@U02AE5GMMHV> <@U01LVJ30QEB>",
"text": "*<${{env.RELEASES_URL}}v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\nCC: <@U03KG4BK1L1> <@U024YF8CR53> <@U01LVJ30QEB>",
"blocks": [
{
"type": "header",
Expand All @@ -115,7 +115,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*<${{env.RELEASES_URL}}v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\nCC: <@U03KG4BK1L1> <@U02AE5GMMHV> <@U01LVJ30QEB>"
"text": "*<${{env.RELEASES_URL}}v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\nCC: <@U03KG4BK1L1> <@U024YF8CR53> <@U01LVJ30QEB>"
}
}
]
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/verify-server-start.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Verify Server start

on:
pull_request:
types: ['opened', 'reopened', 'synchronize']

jobs:
check-health:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 1

- name: Setup Node
uses: actions/[email protected]
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Start server
run: npm run build:start &

- name: Wait for server to start
run: sleep 10 # Adjust the time as necessary for your server to start

- name: Check server health
run: |
curl --fail http://localhost:9090/health || exit 1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,5 @@ dist
.idea

# component test report
test_reports/
test_reports/
temp/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.0
18.20.1
Loading

0 comments on commit 2c15d0c

Please sign in to comment.