Unverified Commit 24f0c2fe authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

[ci] skip doc jobs take #3 (#8885)

* check that we get any match first

* docs only

* 2 docs only

* add code

* restore
parent 693ac359
...@@ -12,14 +12,14 @@ commands: ...@@ -12,14 +12,14 @@ commands:
name: docs-only changes skip check name: docs-only changes skip check
command: | command: |
# pipeline.git.base_revision is not always defined, so only proceed if all external vars are defined # pipeline.git.base_revision is not always defined, so only proceed if all external vars are defined
if test -n "<< pipeline.git.base_revision >>" && test -n "<< pipeline.git.revision >>" if test -n "<< pipeline.git.base_revision >>" && test -n "<< pipeline.git.revision >>" && test -n "$(git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >>)"
then then
if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$' if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$'
then then
echo "Non-docs were modified in this PR, proceeding normally" echo "Non-docs were modified in this PR, proceeding normally"
else else
echo "Only docs were modified in this PR, quitting this job" echo "Only docs were modified in this PR, quitting this job"
#circleci step halt circleci step halt
fi fi
else else
echo "Can't perform skipping check w/o base_revision defined, continuing the job" echo "Can't perform skipping check w/o base_revision defined, continuing the job"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment