Skip to content

Commit

Permalink
cirrus: add step to validate integrity of vendor
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya Rajan <arajan@redhat.com>
  • Loading branch information
flouthoc committed Dec 15, 2021
1 parent 81159c1 commit 76d73fc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ build_task:

validate_task:
alias: "validate"
depends_on:
- "build"
cargo_cache: *ro_cargo_cache
targets_cache: *ro_targets_cache
bin_cache: *ro_bin_cache
setup_script: *setup
main_script: *main

verify_vendor_task:
alias: "verify_vendor"
depends_on:
- "build"
# From this point forward, all cache's become read-only - meaning
Expand All @@ -106,7 +116,6 @@ validate_task:
setup_script: *setup
main_script: *main


unit_task:
alias: "unit"
depends_on:
Expand Down Expand Up @@ -159,6 +168,7 @@ success_task:
depends_on:
- "build"
- "validate"
- "verify_vendor"
- "unit"
- "integration"
- "meta"
Expand Down
9 changes: 9 additions & 0 deletions contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ _run_validate() {
make validate
}

_run_verify_vendor() {
if git diff --no-ext-diff --quiet --exit-code;
then
echo No tampering with vendor...;
else
return 1;
fi;
}

_run_unit() {
make unit
}
Expand Down

0 comments on commit 76d73fc

Please sign in to comment.