summaryrefslogtreecommitdiff
path: root/contrib/cirrus/pr-should-include-tests
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2022-04-25 14:45:40 -0400
committerChris Evich <cevich@redhat.com>2022-05-10 10:49:32 -0400
commitabf4f77bc76b456f6f4c2ecbfc4db4dcb2523ee2 (patch)
tree17236ba1024a616bb5164fff20e6479376d6c1ff /contrib/cirrus/pr-should-include-tests
parent237f7612628cb66920c4d63dea1aa1b015ec2e68 (diff)
downloadpodman-abf4f77bc76b456f6f4c2ecbfc4db4dcb2523ee2.tar.gz
podman-abf4f77bc76b456f6f4c2ecbfc4db4dcb2523ee2.tar.bz2
podman-abf4f77bc76b456f6f4c2ecbfc4db4dcb2523ee2.zip
Cirrus: Simplify use of cache in automation
With the increasingly complex `.cirrus.yml` task relationships, build cache wasn't always working as intended. Recently, non-build tasks were observed assuming authority over `gopath_cache`. Ref.: https://github.com/containers/podman/pull/13998#issuecomment-1108834538 Address this by an overall simplification using artifacts instead of cache. Using artifacts allows establishing concrete authorship/authority over cached repo. content. In this way, dependent tasks may simply consume the artifact with `curl` instead of relying on complex caching algorithms. Also/Minor: Add YAML checking to the pre-commit configuration. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/pr-should-include-tests')
-rwxr-xr-xcontrib/cirrus/pr-should-include-tests27
1 files changed, 14 insertions, 13 deletions
diff --git a/contrib/cirrus/pr-should-include-tests b/contrib/cirrus/pr-should-include-tests
index 0d39047a6..57ca39d9b 100755
--- a/contrib/cirrus/pr-should-include-tests
+++ b/contrib/cirrus/pr-should-include-tests
@@ -30,19 +30,20 @@ fi
# Nothing changed under test subdirectory.
#
# This is OK if the only files being touched are "safe" ones.
-filtered_changes=$(git diff --name-only $base $head |
- fgrep -vx .cirrus.yml |
- fgrep -vx .gitignore |
- fgrep -vx Makefile |
- fgrep -vx go.mod |
- fgrep -vx go.sum |
- egrep -v '^[^/]+\.md$' |
- egrep -v '^.github' |
- egrep -v '^contrib/' |
- egrep -v '^docs/' |
- egrep -v '^hack/' |
- egrep -v '^nix/' |
- egrep -v '^vendor/' |
+filtered_changes=$(git diff --name-only $base $head |
+ fgrep -vx .cirrus.yml |
+ fgrep -vx .pre-commit-config.yaml |
+ fgrep -vx .gitignore |
+ fgrep -vx Makefile |
+ fgrep -vx go.mod |
+ fgrep -vx go.sum |
+ egrep -v '^[^/]+\.md$' |
+ egrep -v '^.github' |
+ egrep -v '^contrib/' |
+ egrep -v '^docs/' |
+ egrep -v '^hack/' |
+ egrep -v '^nix/' |
+ egrep -v '^vendor/' |
egrep -v '^version/')
if [[ -z "$filtered_changes" ]]; then
exit 0