Skip to content

Commit

Permalink
Add staging branch
Browse files Browse the repository at this point in the history
Signed-off-by: Moti Asayag <[email protected]>

rh-pre-commit.version: 2.3.0
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
masayag committed Jun 23, 2024
1 parent 62fc922 commit 5acfaa1
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
branches:
- main
- staging
paths:
- '**/*.sh'
- .github/workflows/checks.yaml
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/create-ocp-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Create OCP project workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'create-ocp-project/**'
- 'pipeline/**'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/escalation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Escalation workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'escalation/**'
- 'pipeline/**'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/greeting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Greeting workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'greeting/**'
- 'pipeline/**'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/jira-listener.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Build and push jira-listener container image for Escalation workflow
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'escalation/jira-listener/**'
- 'pipeline/**'
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/m2k-func.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:
default: true
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'move2kube/m2k-func/**'
- 'pipeline/**'
Expand Down Expand Up @@ -96,7 +98,7 @@ jobs:
git config --global user.name ${{ github.event.head_commit.author.name || github.triggering_actor }}
gh repo clone $WF_CONFIG_REPO config-repo
cd config-repo
git switch -c m2k-kfunc-autopr-$RANDOM
git switch -c m2k-kfunc-autopr-$RANDOM origin/staging
./hack/bump_chart_version.sh move2kube --bump-patch-version
Expand All @@ -115,7 +117,7 @@ jobs:
echo "Automated PR from $PR_OR_COMMIT_URL" | git commit --amend --file=-
git remote set-url origin https://${{ env.GH_TOKEN }}@github.com/$WF_CONFIG_REPO
git push origin HEAD
gh pr create -f --title "m2k-kfunc: Automatic m2k-kfunc image tag bump" \
gh pr create --base staging -f --title "m2k-kfunc: Automatic m2k-kfunc image tag bump" \
--body "
Updating generated image tag for m2k-kfunc application
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
git config --global user.name ${{ github.event.head_commit.author.name || github.triggering_actor }}
gh repo clone $WF_CONFIG_REPO config-repo
cd config-repo
git switch -c ${{ inputs.workflow_id }}-autopr-$RANDOM
git switch -c ${{ inputs.workflow_id }}-autopr-$RANDOM origin/staging
./hack/bump_chart_version.sh ${{ inputs.workflow_id }} --bump-patch-version
Expand All @@ -184,7 +184,7 @@ jobs:
echo "Automated PR from $PR_OR_COMMIT_URL" | git commit --amend --file=-
git remote set-url origin https://${{ env.GH_TOKEN }}@github.com/$WF_CONFIG_REPO
git push origin HEAD
gh pr create -f --title "${{ inputs.workflow_id }}: Automatic manifests generation" \
gh pr create --base staging -f --title "${{ inputs.workflow_id }}: Automatic manifests generation" \
--body "
Updating generated manifests for ${{ inputs.workflow_id }} workflow
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/modify-vm-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Modify VM resource workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'modify-vm-resources/**'
- 'pipeline/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/move2kube-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request_target:
branches:
- main
- staging
paths:
- 'move2kube/**'
- 'pipeline/**'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/move2kube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Move2kube workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'move2kube/**'
- 'pipeline/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mta-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
branches:
- main
- staging
paths:
- 'mta/**'
- 'pipeline/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mta-v6.x-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
branches:
- main
- staging
paths:
- 'mta-v6.x/**'
- 'pipeline/**'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/mta-v6.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: MTA v6.x workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'mta-v6.x/**'
- 'pipeline/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mta-v7.x-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
branches:
- main
- staging
paths:
- 'mta-v7.x/**'
- 'pipeline/**'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/mta-v7.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: MTA v7.x workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'mta-v7.x/**'
- 'pipeline/**'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/mta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: MTA workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'mta/**'
- 'pipeline/**'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/request-vm-cnv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Request VM creation using CNV workflow container image and manifest push
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches:
- main
- staging
paths:
- 'request-vm-cnv/**'
- 'pipeline/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-executor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ jobs:
PR_BODY+="\n\nThis PR was created automatically as a result of merging ${PR_OR_COMMIT_URL}"
# Create the PR using the constructed body
gh pr create -f --title "${{ inputs.workflow_id }}: Automatic manifests generation" --body "${PR_BODY}"
gh pr create --base staging -f --title "${{ inputs.workflow_id }}: Automatic manifests generation" --body "${PR_BODY}"
2 changes: 1 addition & 1 deletion scripts/push_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo "Cloning ${DEPLOYMENT_REPO}"
git clone https://github.com/"${DEPLOYMENT_REPO}" helm-repo
cd helm-repo || exit

git switch -c autopr-${RANDOM} origin/"${DEPLOYMENT_BRANCH}"
git switch -c autopr-${RANDOM} origin/"${DEPLOYMENT_BRANCH}" origin/staging
# We assume the kustomize project already exists, this is not part of the PR
cp ../"${WORKFLOW_ID}"/manifests/* kustomize/"${WORKFLOW_ID}"/base
# Applying image kustomization
Expand Down

0 comments on commit 5acfaa1

Please sign in to comment.