Skip to content

Commit

Permalink
Feature set job controls (#2066)
Browse files Browse the repository at this point in the history
* Updated set_job_controls.sh to add a check for the skip all keyword

* Added a space to check keyword ci-skip-all

Co-authored-by: Julie Prestopnik <[email protected]>
  • Loading branch information
jprestop and Julie Prestopnik authored Feb 23, 2022
1 parent ba71e4c commit 36bdf26
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/jobs/set_job_controls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ input_data_version=develop
truth_data_version=develop

if [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then

# only run diff logic if pull request INTO
# only run diff logic if pull request INTO
# branches not ending with -ref
if [ "${GITHUB_BASE_REF: -4}" != "-ref" ]; then

Expand All @@ -36,25 +36,37 @@ elif [ "${GITHUB_EVENT_NAME}" == "push" ]; then
if [ "$branch_name" == "develop" ] ||
[ "${branch_name:0:6}" == "main_v" ]; then

run_diff=true
truth_data_version=${branch_name}
run_diff=true
truth_data_version=${branch_name}

fi

# check commit messages for skip or force keywords
if grep -q "ci-skip-all" <<< "$commit_msg"; then

run_compile=false
run_push=false
run_unit_tests=false
run_diff=false
run_update_truth=false

fi

# check commit messages for ci-skip or ci-run keywords
if grep -q "ci-skip-compile" <<< "$commit_msg"; then

run_compile=false
run_compile=false

fi

if grep -q "ci-run-unit" <<< "$commit_msg"; then

run_diff=true
run_diff=true

fi

fi

fi

# if updating truth or running diff, run unit tests
Expand Down

0 comments on commit 36bdf26

Please sign in to comment.