forked from containers/netavark-dhcp-proxy-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cirrus: Groom rust cache before updating
Port of containers/netavark#553 Signed-off-by: Chris Evich <cevich@redhat.com>
- Loading branch information
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# | ||
# This script is intended to be run from Cirrus-CI to prepare the | ||
# rust targets cache for re-use during subsequent runs. This mainly | ||
# involves removing files and directories which change frequently | ||
# but are cheap/quick to regenerate - i.e. prevent "cache-flapping". | ||
# Any other use of this script is not supported and may cause harm. | ||
|
||
set -eo pipefail | ||
|
||
SCRIPT_DIRPATH=$(dirname ${BASH_SOURCE[0]}) | ||
source $SCRIPT_DIRPATH/lib.sh | ||
|
||
if [[ "$CIRRUS_CI" != true ]] || [[ -z "$DEST_BRANCH" ]]; then | ||
die "Script is not intended for use outside of Cirrus-CI" | ||
fi | ||
|
||
SCRIPT_DEST=$SCRIPT_DIRPATH/cache_groom.sh | ||
showrun curl --location --silent --show-error -o $SCRIPT_DEST \ | ||
https://raw.githubusercontent.com/containers/netavark/$DEST_BRANCH/contrib/cirrus/cache_groom.sh | ||
|
||
# Certain common automation library calls assume execution from this file | ||
exec bash $SCRIPT_DEST |