Skip to content

Commit 2e968ae

Browse files
authored
Merge pull request #602 from github/hao/optional-cluster-tests
Add cluster run as optional runs
2 parents 4b71b29 + 65d6171 commit 2e968ae

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed

.github/pull_request_template.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1+
<!-- Welcome to backup-utils-private repo and Thanks for contributing!
2+
3+
Note: Merging to the master branch will include your change in a future (unreleased) version of backup-utils. If the change needs to be shipped to the current release versions it will need to be backported. For more information, see the backport guide https://github.com/github/enterprise-releases/blob/master/docs/backport-an-existing-pr.md
4+
5+
If you have any questions we can be found in the #ghes-backup-utils Slack channel.
6+
-->
7+
8+
<!--
9+
Additional notes regarding CI:
10+
- All required CIs needs to be pass before merging PR
11+
- Integration test will run against enterprise2 repo with environment variable, do not re-run directly from janky or Github CI, please use Actions to re-run the failed tests
12+
- If you are making changes impacts cluster, please add `cluster` label or `[cluster]` in your PR title so it will trigger optional cluster integration test. Those tests will take about 3 hours so relax and come back later to check the results. ;)
13+
-->
14+
115
# PR Details
216

3-
### Description
17+
## Description
418
<!--
519
[Please fill out a brief description of the change being made]
620
-->
7-
### Testing
21+
## Testing
822
<!--
923
[Please add testing done as part of this change.]
1024
-->
@@ -17,10 +31,10 @@
1731
- Please make sure those versions are tested against for this change
1832
-->
1933

20-
### Ownership
34+
## Ownership
2135
<!-- [Add any relevants owners for this change]
2236
-->
2337

24-
### Related Links
38+
## Related Links
2539
<!-- [Please add any related links/issues to this PR]
2640
-->

.github/workflows/integration-tests.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,31 @@ jobs:
3737
janky-token: '${{ secrets.API_AUTH_TOKEN }}'
3838
job-name: '${{ matrix.jankyJobName }}'
3939
branch-name: '${{ env.SOURCE_BRANCH }}'
40-
force : "true"
40+
# enterprise2 target branch is same as target branch for PR (either master or enterprise-[0-9]*.[0-9]*-release)
41+
envVars: "JANKY_ENV_BACKUP_UTILS_BRANCH=${{ env.SOURCE_BRANCH }},JANKY_ENV_ENTERPRISE2_BRANCH=${{ env.TARGET_BRANCH }}"
42+
43+
# Cluster integration tests are optional based on label and PR titles
44+
cluster-integration-tests:
45+
runs-on: ubuntu-latest
46+
strategy:
47+
matrix:
48+
jankyJobName:
49+
- enterprise2-backup-utils-cluster-binary-backup
50+
- enterprise2-backup-utils-cluster-migration
51+
steps:
52+
- uses: actions/checkout@v3
53+
with:
54+
fetch-depth: 1
55+
- name: Queue ${{ matrix.jankyJobName }} build
56+
if: |
57+
github.event_name == 'workflow_dispatch' ||
58+
contains(github.event.pull_request.title, '[cluster]') ||
59+
contains(github.event.pull_request.labels.*.name, 'cluster')
60+
uses: ./.github/actions/proxy-janky-build
61+
id: proxy-janky-build
62+
with:
63+
janky-token: '${{ secrets.API_AUTH_TOKEN }}'
64+
job-name: '${{ matrix.jankyJobName }}'
65+
branch-name: '${{ env.SOURCE_BRANCH }}'
4166
# enterprise2 target branch is same as target branch for PR (either master or enterprise-[0-9]*.[0-9]*-release)
4267
envVars: "JANKY_ENV_BACKUP_UTILS_BRANCH=${{ env.SOURCE_BRANCH }},JANKY_ENV_ENTERPRISE2_BRANCH=${{ env.TARGET_BRANCH }}"

0 commit comments

Comments
 (0)