Skip to content

Commit 1f42e3a

Browse files
authored
Merge pull request #658 from github/enterprise-3.9-backport-602-hao/optional-cluster-tests
Backport 602 for 3.9: Add cluster run as optional runs
2 parents 689e829 + 032dc44 commit 1f42e3a

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed

.github/pull_request_template.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
15+
# PR Details
16+
17+
## Description
18+
<!--
19+
[Please fill out a brief description of the change being made]
20+
-->
21+
## Testing
22+
<!--
23+
[Please add testing done as part of this change.]
24+
-->
25+
<!-- Keep in mind that for backup-utils the following applies:
26+
- Backup-util [current version] will support
27+
- GHES [current version]
28+
- GHES [current version -1]
29+
- GHES [current version -2]
30+
- Any changes that are made to backup-utils will also need to be supported on those GHES versions above (n-2)
31+
- Please make sure those versions are tested against for this change
32+
-->
33+
34+
## Ownership
35+
<!-- [Add any relevants owners for this change]
36+
-->
37+
38+
## Related Links
39+
<!-- [Please add any related links/issues to this PR]
40+
-->

.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)