Skip to content

Commit 21d4fa7

Browse files
committed
Merge branch 'develop' of https://github.com/rudderlabs/rudder-transformer into technocrats/ONCEHUB-94984
2 parents bc68ba0 + d641594 commit 21d4fa7

File tree

856 files changed

+56395
-27371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

856 files changed

+56395
-27371
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ scripts/skipPrepareScript.js
2626
.eslintignore
2727
.prettierignore
2828
*.json
29+
Dockerfile*
30+
*.properties
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Allure Test Reporter
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
id-token: write
16+
contents: write # Required for gh-pages deployment
17+
18+
jobs:
19+
test_and_publish:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4.2.1
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4.0.4
28+
with:
29+
node-version-file: '.nvmrc'
30+
cache: 'npm'
31+
32+
- name: Install Dependencies
33+
run: npm ci
34+
35+
- name: Run Tests and Generate Report
36+
run: |
37+
npm run test:ts:silent
38+
39+
- name: Install Allure
40+
run: npm install -g allure-commandline
41+
42+
- name: Generate Allure Report
43+
run: |
44+
REPO_NAME=$(basename ${{ github.repository }})
45+
PR_NUMBER=${{ github.event.pull_request.number }}
46+
REPORT_FOLDER="${REPO_NAME}/${PR_NUMBER}"
47+
allure generate allure-results --clean -o "${REPORT_FOLDER}"
48+
echo "REPORT_FOLDER=${REPORT_FOLDER}" >> $GITHUB_ENV # Persist this variable
49+
50+
- name: Checkout Reports Repository
51+
uses: actions/checkout@v4
52+
with:
53+
repository: rudderlabs/test-reports
54+
token: ${{ secrets.PAT }}
55+
path: test-reports
56+
57+
- name: Copy Allure Report to Reports Repository
58+
run: |
59+
mkdir -p "test-reports/$REPORT_FOLDER"
60+
cp -r $REPORT_FOLDER/* test-reports/$REPORT_FOLDER/
61+
62+
- name: Cleanup Old Reports (Keep Only Last 50)
63+
run: |
64+
REPO_NAME=$(basename ${{ github.repository }})
65+
cd test-reports/${REPO_NAME}
66+
ls -t | tail -n +51 | xargs rm -rf || echo "No old reports to delete"
67+
68+
- name: Commit and Push Report
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.PAT }}
71+
run: |
72+
cd test-reports
73+
git config --global user.name "github-actions"
74+
git config --global user.email "github-actions@github.com"
75+
76+
# Stash any unstaged changes before pulling
77+
git add .
78+
git stash || echo "No changes to stash"
79+
80+
# Pull latest changes safely
81+
git pull --rebase origin main
82+
83+
# Apply the stashed changes back
84+
git stash pop || echo "No stash to apply"
85+
86+
# Commit new report if there are changes
87+
git add .
88+
git commit -m "chore: add allure report for $REPORT_FOLDER" || echo "No changes to commit"
89+
90+
# Push changes with retry logic
91+
for i in {1..5}; do
92+
git push origin main && break || sleep 5
93+
git pull --rebase origin main
94+
done
95+
96+
- name: Add Test Report Link as Comment on PR
97+
uses: actions/github-script@v7
98+
with:
99+
github-token: ${{ secrets.PAT }}
100+
script: |
101+
const { owner, repo } = context.repo;
102+
const prNumber = context.payload.pull_request.number;
103+
104+
const reportFolder = process.env.REPORT_FOLDER; // Read from environment variable
105+
const commentBody = `Allure Test reports for this run are available at:
106+
- Allure Report: [View Report](https://rudderlabs.github.io/test-reports/${reportFolder}/index.html)`;
107+
108+
// Comment on the pull request
109+
await github.rest.issues.createComment({
110+
owner,
111+
repo,
112+
issue_number: prNumber,
113+
body: commentBody
114+
});

.github/workflows/build-push-docker-image.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on:
3333
workflow_url:
3434
type: string
3535
secrets:
36-
DOCKERHUB_PROD_TOKEN:
36+
DOCKERHUB_TOKEN:
3737
required: true
3838
DOCKERHUB_USERNAME:
3939
required: true
@@ -101,7 +101,7 @@ jobs:
101101
with:
102102
ref: ${{ needs.get_sha.outputs.sha }}
103103
fetch-depth: 1
104-
104+
105105
- name: Login to DockerHub
106106
uses: docker/login-action@v3.3.0
107107
with:
@@ -154,12 +154,12 @@ jobs:
154154
with:
155155
ref: ${{ needs.get_sha.outputs.sha }}
156156
fetch-depth: 1
157-
157+
158158
- name: Login to DockerHub
159159
uses: docker/login-action@v3.3.0
160160
with:
161161
username: ${{ env.DOCKERHUB_USERNAME }}
162-
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}
162+
password: ${{ secrets.DOCKERHUB_TOKEN }}
163163

164164
- name: Setup Docker Buildx
165165
uses: docker/setup-buildx-action@v3.7.1
@@ -207,7 +207,7 @@ jobs:
207207
uses: docker/login-action@v3.3.0
208208
with:
209209
username: ${{ env.DOCKERHUB_USERNAME }}
210-
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}
210+
password: ${{ secrets.DOCKERHUB_TOKEN }}
211211

212212
- name: Set up Docker Buildx
213213
uses: docker/setup-buildx-action@v3.7.1

.github/workflows/component-test-report.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.github/workflows/create-hotfix-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
# Only allow these users to create new hotfix branch from 'main'
16-
if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'koladilip' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'utsabc') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'utsabc')
16+
if: github.ref == 'refs/heads/main' && (github.actor == 'vinayteki95' || github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'koladilip' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'utsabc') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'utsabc' || github.triggering_actor == 'vinayteki95')
1717
steps:
1818
- name: Create Branch
1919
uses: peterjgrainger/action-create-branch@v2.4.0

.github/workflows/draft-new-release.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
# Only allow release stakeholders to initiate releases
11-
if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'koladilip' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'yashasvibajpai' || github.actor == 'sanpj2292' || github.actor == 'utsabc') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'yashasvibajpai' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'utsabc')
11+
if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'sandeepdsvs' || github.actor == 'koladilip' || github.actor == 'yashasvibajpai' || github.actor == 'sanpj2292' || github.actor == 'utsabc' || github.actor == 'vinayteki95') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'yashasvibajpai' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'utsabc')
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4.2.1
@@ -79,10 +79,11 @@ jobs:
7979
git push
8080
8181
- name: Create Pull Request
82-
uses: repo-sync/pull-request@v2.12.1
83-
with:
84-
source_branch: ${{ steps.create-release.outputs.branch_name }}
85-
destination_branch: 'main'
86-
github_token: ${{ secrets.PAT }}
87-
pr_title: 'chore(release): pull ${{ steps.create-release.outputs.branch_name }} into main'
88-
pr_body: ':crown: *An automated PR*'
82+
run: |
83+
gh pr create \
84+
--base main \
85+
--head "${{ steps.create-release.outputs.branch_name }}" \
86+
--title "chore(release): pull ${{ steps.create-release.outputs.branch_name }} into main" \
87+
--body ":crown: *An automated PR*"
88+
env:
89+
GH_TOKEN: ${{ secrets.PAT }}

.github/workflows/prepare-for-dev-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ jobs:
7777
secrets:
7878
DOCKERHUB_PROD_TOKEN: ${{ secrets.DOCKERHUB_PROD_TOKEN }}
7979
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
80-
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
80+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/prepare-for-prod-dt-deploy.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,29 +161,29 @@ jobs:
161161
162162
cd customer-objects
163163
164-
declare -a enabled_ut_customers=()
164+
declare -a enabled_dt_customers=()
165165
declare -a sub_directories=('enterprise-us' 'enterprise-eu')
166166
167167
# identify the customers enabled in sub-directories
168168
for directory in "${sub_directories[@]}"; do
169169
for f in "./$directory"/*; do
170170
[[ -f $f ]] || continue
171171
172-
enabled="$(yq e '.spec.user_transformer.enabled' $f)"
172+
enabled="$(yq e '.spec.transformer.enabled' $f)"
173173
if [ $enabled == "true" ]; then
174-
enabled_ut_customers+=( $f )
174+
enabled_dt_customers+=( $f )
175175
fi
176176
done
177177
done
178178
179179
# bump up the customers version and repository information
180-
for customer in "${enabled_ut_customers[@]}"; do
181-
yq eval -i ".spec.user_transformer.image.version=\"$TAG_NAME\"" $customer
182-
yq eval -i ".spec.user_transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" $customer
180+
for customer in "${enabled_dt_customers[@]}"; do
181+
yq eval -i ".spec.transformer.image.version=\"$TAG_NAME\"" $customer
182+
yq eval -i ".spec.transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" $customer
183183
git add $customer
184184
done
185185
186-
git commit -m "chore: upgrade dedicated transformers to $TAG_NAME"
186+
git commit -m "chore: upgrade dedicated dt transformers to $TAG_NAME"
187187
git push -u origin dedicated-transformer-$TAG_NAME
188188
189189
gh pr create --fill

.github/workflows/prepare-for-prod-ut-deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
if: ((startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/') || startsWith(github.event.pull_request.head.ref, 'master')) && github.event.pull_request.merged == true)
3030
outputs:
3131
tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }}
32+
tag_name: ${{ steps.gen_tag_names.outputs.tag_name }}
3233
steps:
3334
- name: Checkout
3435
uses: actions/checkout@v4.2.1
@@ -73,6 +74,7 @@ jobs:
7374
needs: [generate-tag-names, build-user-transformer-image]
7475
env:
7576
UT_TAG_NAME: ${{ needs.generate-tag-names.outputs.tag_name_ut }}
77+
TAG_NAME: ${{ needs.generate-tag-names.outputs.tag_name }}
7678
TF_IMAGE_REPOSITORY: rudderstack/rudder-transformer
7779
steps:
7880
- name: Checkout
@@ -136,3 +138,39 @@ jobs:
136138
git push -u origin hosted-user-transformer-$UT_TAG_NAME
137139
138140
gh pr create --fill
141+
142+
- name: Update helm charts and raise pull request for enterprise customers on dedicated transformers
143+
env:
144+
GITHUB_TOKEN: ${{ secrets.PAT }}
145+
run: |
146+
cd rudder-devops
147+
git checkout -b dedicated-user-transformer-$TAG_NAME
148+
149+
cd customer-objects
150+
151+
declare -a enabled_ut_customers=()
152+
declare -a sub_directories=('enterprise-us' 'enterprise-eu')
153+
154+
# identify the customers enabled in sub-directories
155+
for directory in "${sub_directories[@]}"; do
156+
for f in "./$directory"/*; do
157+
[[ -f $f ]] || continue
158+
159+
enabled="$(yq e '.spec.user_transformer.enabled' $f)"
160+
if [ $enabled == "true" ]; then
161+
enabled_ut_customers+=( $f )
162+
fi
163+
done
164+
done
165+
166+
# bump up the customers version and repository information
167+
for customer in "${enabled_ut_customers[@]}"; do
168+
yq eval -i ".spec.user_transformer.image.version=\"$TAG_NAME\"" $customer
169+
yq eval -i ".spec.user_transformer.image.repository=\"$TF_IMAGE_REPOSITORY\"" $customer
170+
git add $customer
171+
done
172+
173+
git commit -m "chore: upgrade dedicated user transformers to $TAG_NAME"
174+
git push -u origin dedicated-user-transformer-$TAG_NAME
175+
176+
gh pr create --fill

0 commit comments

Comments
 (0)