forked from opensearch-project/opensearch-migrations
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.43 KB
/
rfs_pr_e2e_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Jenkins
on:
push:
branches-ignore:
- 'backport/**'
- 'dependabot/**'
pull_request_target:
types: [opened, synchronize, reopened]
env:
python-version: '3.11'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
rfs-e2e-aws-test:
runs-on: ubuntu-latest
steps:
- name: Determine Github repository and branch
id: determine-repo-vars
run: |
if [[ "${GITHUB_EVENT_NAME}" == "pull_request_target" ]]; then
branch_name="${{ github.event.pull_request.head.ref }}"
pr_repo_url="https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git"
else
branch_name="${{ github.ref_name }}"
pr_repo_url="https://github.com/${{ github.repository }}.git"
fi
echo "Running jenkins test on repo: $pr_repo_url and branch: $branch_name"
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
echo "pr_repo_url=$pr_repo_url" >> $GITHUB_OUTPUT
- name: Jenkins Job Trigger and Monitor
uses: lewijacn/[email protected]
with:
jenkins_url: "https://migrations.ci.opensearch.org"
job_name: "rfs-default-e2e-test"
api_token: "${{ secrets.JENKINS_MIGRATIONS_GENERIC_WEBHOOK_TOKEN }}"
job_params: "GIT_REPO_URL=${{ steps.determine-repo-vars.outputs.pr_repo_url }},GIT_BRANCH=${{ steps.determine-repo-vars.outputs.branch_name }}"