-
Notifications
You must be signed in to change notification settings - Fork 602
Migrate Jenkins PR builder to GitHub Action [DI-336] #674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
b50075e
5238c7c
0954087
b0b66bd
967b2d8
7845599
45db5df
09f85b2
d2712bb
680f072
f2942f0
f8134d7
79c98ab
95e8cc2
64e068c
9a8e3fd
f92a4d1
0b627ef
04e9f5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Builder | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| check_for_membership: | ||
| runs-on: ubuntu-latest | ||
| name: Check membership of given user | ||
| outputs: | ||
| check-result: ${{ steps.composite.outputs.check-result }} | ||
|
|
||
| steps: | ||
| - name: Action for membership check | ||
| id: composite | ||
| uses: hazelcast/hazelcast-tpm/membership@main | ||
| with: | ||
| organization-name: 'hazelcast' | ||
| member-name: ${{ github.event.pull_request.head.repo.owner.login }} | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| default: | ||
| needs: [check_for_membership] | ||
| if: needs.check_for_membership.outputs.check-result == 'true' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Detect untrusted community PR | ||
| if: ${{ needs.check_for_membership.outputs.check-result == 'false' }} | ||
| run: | | ||
| gh pr comment ${{ github.event.number }} \ | ||
|
||
| --body "👽 Untrusted non Hazelcast PR, \`${GITHUB_JOB}\` must be [run manually](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})." | ||
| exit 1 | ||
| env: | ||
| GH_TOKEN: ${{ inputs.GITHUB_TOKEN }} | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: 17 | ||
| distribution: temurin | ||
| - name: Build and test | ||
| env: | ||
| HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }} | ||
| run: | | ||
| set -x | ||
nishaatr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| mvn \ | ||
| --batch-mode \ | ||
| --errors \ | ||
| --no-transfer-progress \ | ||
| ${RUNNER_DEBUG:+--show-version} \ | ||
| package | ||
| env: | ||
| HZ_LICENSEKEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }} | ||
Uh oh!
There was an error while loading. Please reload this page.