Skip to content

Commit 2f27c6f

Browse files
committed
enterprise branch
1 parent 7253d93 commit 2f27c6f

File tree

8 files changed

+53
-61
lines changed

8 files changed

+53
-61
lines changed

.github/workflows/e2e.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ jobs:
3636
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
3737
run: |
3838
# Determine branch from webhook or manual input
39-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
40-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
41-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
42-
else
43-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
39+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
40+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
41+
if [ "$BRANCH" = "null" ]; then
42+
BRANCH="enterprise"
4443
fi
4544
4645
echo "Cloning branch: $BRANCH"

.github/workflows/fuse-integration.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,10 @@ jobs:
4141
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
4242
run: |
4343
# Determine branch from webhook or manual input
44-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
45-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
46-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
47-
else
48-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
44+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
45+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
46+
if [ "$BRANCH" = "null" ]; then
47+
BRANCH="enterprise"
4948
fi
5049
5150
echo "Cloning branch: $BRANCH"

.github/workflows/gitlab_webhook_build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
echo "Raw user from payload: '$RAW_USER'"
5757
5858
# If template variables weren't replaced (still contain %), use defaults
59-
if [[ "$RAW_REF" == *"%{"* ]] || [ -z "$RAW_REF" ]; then
59+
if [[ "$RAW_REF" == *"%{"* ]] || [ -z "$RAW_REF" ] || [ "$RAW_REF" = "null" ]; then
6060
echo "⚠️ GitLab template variables not replaced, using defaults"
6161
GITLAB_REF="refs/heads/enterprise"
6262
GITLAB_BRANCH="enterprise"
@@ -67,6 +67,10 @@ jobs:
6767
echo "✅ GitLab template variables replaced successfully"
6868
GITLAB_REF="${{ github.event.client_payload.ref }}"
6969
GITLAB_BRANCH=$(echo "$GITLAB_REF" | sed 's|refs/heads/||')
70+
if [ "$GITLAB_BRANCH" = "null" ]; then
71+
GITLAB_BRANCH="enterprise"
72+
GITLAB_REF="refs/heads/enterprise"
73+
fi
7074
GITLAB_USER="${{ github.event.client_payload.user_name }}"
7175
GITLAB_COMMIT="${{ github.event.client_payload.after }}"
7276
GITLAB_COMMIT_MSG="Push to $GITLAB_BRANCH by $GITLAB_USER"

.github/workflows/go.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ jobs:
3636
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
3737
run: |
3838
# Determine branch from webhook or manual input
39-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
40-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
41-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
42-
else
43-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
39+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
40+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
41+
if [ "$BRANCH" = "null" ]; then
42+
BRANCH="enterprise"
4443
fi
4544
4645
echo "Cloning branch: $BRANCH"

.github/workflows/kafka-tests.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ jobs:
3636
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
3737
run: |
3838
# Determine branch from webhook or manual input
39-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
40-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
41-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
42-
else
43-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
39+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
40+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
41+
if [ "$BRANCH" = "null" ]; then
42+
BRANCH="enterprise"
4443
fi
4544
4645
echo "Cloning branch: $BRANCH"
@@ -82,11 +81,10 @@ jobs:
8281
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
8382
run: |
8483
# Determine branch from webhook or manual input
85-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
86-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
87-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
88-
else
89-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
84+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
85+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
86+
if [ "$BRANCH" = "null" ]; then
87+
BRANCH="enterprise"
9088
fi
9189
9290
echo "Cloning branch: $BRANCH"
@@ -128,11 +126,10 @@ jobs:
128126
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
129127
run: |
130128
# Determine branch from webhook or manual input
131-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
132-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
133-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
134-
else
135-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
129+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
130+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
131+
if [ "$BRANCH" = "null" ]; then
132+
BRANCH="enterprise"
136133
fi
137134
138135
echo "Cloning branch: $BRANCH"

.github/workflows/postgres-tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ jobs:
3636
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
3737
run: |
3838
# Determine branch from webhook or manual input
39-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
40-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
41-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
42-
else
43-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
39+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
40+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
41+
if [ "$BRANCH" = "null" ]; then
42+
BRANCH="enterprise"
4443
fi
4544
4645
echo "Cloning branch: $BRANCH"

.github/workflows/s3-go-tests.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ jobs:
4040
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
4141
run: |
4242
# Determine branch from webhook or manual input
43-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
44-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
45-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
46-
else
47-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
43+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
44+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
45+
if [ "$BRANCH" = "null" ]; then
46+
BRANCH="enterprise"
4847
fi
4948
5049
echo "Cloning branch: $BRANCH"
@@ -178,11 +177,10 @@ jobs:
178177
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
179178
run: |
180179
# Determine branch from webhook or manual input
181-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
182-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
183-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
184-
else
185-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
180+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
181+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
182+
if [ "$BRANCH" = "null" ]; then
183+
BRANCH="enterprise"
186184
fi
187185
188186
echo "Cloning branch: $BRANCH"
@@ -265,11 +263,10 @@ jobs:
265263
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
266264
run: |
267265
# Determine branch from webhook or manual input
268-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
269-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
270-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
271-
else
272-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
266+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
267+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
268+
if [ "$BRANCH" = "null" ]; then
269+
BRANCH="enterprise"
273270
fi
274271
275272
echo "Cloning branch: $BRANCH"
@@ -349,11 +346,10 @@ jobs:
349346
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
350347
run: |
351348
# Determine branch from webhook or manual input
352-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
353-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
354-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
355-
else
356-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
349+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
350+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
351+
if [ "$BRANCH" = "null" ]; then
352+
BRANCH="enterprise"
357353
fi
358354
359355
echo "Cloning branch: $BRANCH"

.github/workflows/s3tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ jobs:
3636
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
3737
run: |
3838
# Determine branch from webhook or manual input
39-
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
40-
BRANCH_REF="${{ github.event.client_payload.ref || 'refs/heads/enterprise' }}"
41-
BRANCH=$(echo "$BRANCH_REF" | sed 's|refs/heads/||')
42-
else
43-
BRANCH="${{ github.event.inputs.gitlab_branch || 'enterprise' }}"
39+
BRANCH="${{ github.event_name == 'repository_dispatch' && github.event.client_payload.ref || github.event.inputs.gitlab_branch || 'enterprise' }}"
40+
BRANCH=$(echo "$BRANCH" | sed 's|refs/heads/||')
41+
if [ "$BRANCH" = "null" ]; then
42+
BRANCH="enterprise"
4443
fi
4544
4645
echo "Cloning branch: $BRANCH"

0 commit comments

Comments
 (0)