forked from opensearch-project/opensearch-migrations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andre Kurait <[email protected]>
- Loading branch information
1 parent
65a662b
commit 232d5bb
Showing
1 changed file
with
35 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
name: Jenkins | ||
# name: Jenkins | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'backport/**' | ||
- 'dependabot/**' | ||
pull_request_target: | ||
types: [opened, synchronize, reopened] | ||
# on: | ||
# push: | ||
# branches-ignore: | ||
# - 'backport/**' | ||
# - 'dependabot/**' | ||
# pull_request_target: | ||
# types: [opened, synchronize, reopened] | ||
|
||
env: | ||
python-version: '3.11' | ||
# env: | ||
# python-version: '3.11' | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
# permissions: | ||
# contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
full-es68-e2e-aws-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Sanitize branch and repo names | ||
env: | ||
BRANCH_NAME: ${{ github.event.pull_request.head.ref || github.ref_name }} | ||
REPO_BASE: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | ||
id: sanitize-input | ||
run: | | ||
clean_branch_name=$(echo "$BRANCH_NAME" | tr -cd '[:alnum:]_\-\./') | ||
clean_repo_base=$(echo "$REPO_BASE" | tr -cd '[:alnum:]_\-\./') | ||
clean_repo_url="https://github.com/$clean_repo_base.git" | ||
echo "Running jenkins test on repo: $clean_repo_url and branch: $clean_branch_name" | ||
echo "branch_name=$clean_branch_name" >> $GITHUB_OUTPUT | ||
echo "pr_repo_url=$clean_repo_url" >> $GITHUB_OUTPUT | ||
- name: Jenkins Job Trigger and Monitor | ||
uses: lewijacn/[email protected] | ||
with: | ||
jenkins_url: "https://migrations.ci.opensearch.org" | ||
job_name: "full-es68source-e2e-test" | ||
api_token: "${{ secrets.JENKINS_MIGRATIONS_GENERIC_WEBHOOK_TOKEN }}" | ||
job_params: "GIT_REPO_URL=${{ steps.sanitize-input.outputs.pr_repo_url }},GIT_BRANCH=${{ steps.sanitize-input.outputs.branch_name }}" | ||
# jobs: | ||
# full-es68-e2e-aws-test: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Sanitize branch and repo names | ||
# env: | ||
# BRANCH_NAME: ${{ github.event.pull_request.head.ref || github.ref_name }} | ||
# REPO_BASE: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | ||
# id: sanitize-input | ||
# run: | | ||
# clean_branch_name=$(echo "$BRANCH_NAME" | tr -cd '[:alnum:]_\-\./') | ||
# clean_repo_base=$(echo "$REPO_BASE" | tr -cd '[:alnum:]_\-\./') | ||
# clean_repo_url="https://github.com/$clean_repo_base.git" | ||
# echo "Running jenkins test on repo: $clean_repo_url and branch: $clean_branch_name" | ||
# echo "branch_name=$clean_branch_name" >> $GITHUB_OUTPUT | ||
# echo "pr_repo_url=$clean_repo_url" >> $GITHUB_OUTPUT | ||
# - name: Jenkins Job Trigger and Monitor | ||
# uses: lewijacn/[email protected] | ||
# with: | ||
# jenkins_url: "https://migrations.ci.opensearch.org" | ||
# job_name: "full-es68source-e2e-test" | ||
# api_token: "${{ secrets.JENKINS_MIGRATIONS_GENERIC_WEBHOOK_TOKEN }}" | ||
# job_params: "GIT_REPO_URL=${{ steps.sanitize-input.outputs.pr_repo_url }},GIT_BRANCH=${{ steps.sanitize-input.outputs.branch_name }}" |