Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions jenkins/gradle/gradle-check.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ pipeline {
[key: 'pr_title', value: '$.pr_title'],
[key: 'pr_number', value: '$.pr_number'],
[key: 'post_merge_action', value: '$.post_merge_action'],
[key: 'pr_owner', value: '$.pr_owner']
[key: 'pr_owner', value: '$.pr_owner'],
[key: 'exclude_tasks', value: '$.exclude_tasks', defaultValue: '']
],
tokenCredentialId: 'jenkins-gradle-check-generic-webhook-token',
causeString: 'Triggered by PR on OpenSearch core repository',
Expand Down Expand Up @@ -134,7 +135,8 @@ pipeline {
gitRepoUrl: "${pr_from_clone_url}",
gitReference: "${pr_from_sha}",
bwcCheckoutAlign: "${bwc_checkout_align}",
scope: "all"
scope: "all",
excludeTasks: "${exclude_tasks}"
)
}
else {
Expand All @@ -146,7 +148,8 @@ pipeline {
gitRepoUrl: "${GIT_REPO_URL}",
gitReference: "${GIT_REFERENCE}",
bwcCheckoutAlign: "${bwc_checkout_align}",
scope: "all"
scope: "all",
excludeTasks: "${exclude_tasks}"
)
}

Expand Down
8 changes: 6 additions & 2 deletions scripts/gradle/gradle-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ JENKINS_URL="https://build.ci.opensearch.org"
TRIGGER_TOKEN=""
GITHUB_USER=""
GITHUB_TOKEN=""
EXCLUDE_TASKS=""

while getopts "u:t:p:" opt; do
while getopts "u:t:p:e:" opt; do
case $opt in
t)
TRIGGER_TOKEN="$OPTARG"
Expand All @@ -28,6 +29,9 @@ while getopts "u:t:p:" opt; do
p)
GITHUB_TOKEN="$OPTARG"
;;
e)
EXCLUDE_TASKS="$OPTARG"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
Expand Down Expand Up @@ -59,7 +63,7 @@ TIMEPASS=0
TIMEOUT=7200
RESULT="null"
PR_TITLE_NEW=`echo $pr_title | tr -dc '[:alnum:] ' | tr '[:upper:]' '[:lower:]'`
PAYLOAD_JSON="{\"pr_from_sha\": \"$pr_from_sha\", \"pr_from_clone_url\": \"$pr_from_clone_url\", \"pr_to_clone_url\": \"$pr_to_clone_url\", \"pr_title\": \"$PR_TITLE_NEW\", \"pr_number\": \"$pr_number\", \"post_merge_action\": \"$post_merge_action\", \"pr_owner\": \"$pr_owner\"}"
PAYLOAD_JSON="{\"pr_from_sha\": \"$pr_from_sha\", \"pr_from_clone_url\": \"$pr_from_clone_url\", \"pr_to_clone_url\": \"$pr_to_clone_url\", \"pr_title\": \"$PR_TITLE_NEW\", \"pr_number\": \"$pr_number\", \"post_merge_action\": \"$post_merge_action\", \"pr_owner\": \"$pr_owner\", \"exclude_tasks\": \"$EXCLUDE_TASKS\"}"

perform_curl_and_process_with_jq() {
local url=$1
Expand Down
Loading