diff options
author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2014-09-03 11:18:05 +0300 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-09-16 14:30:23 +0200 |
commit | 8ef1a136c1406bd1bab66e4ebf75b9375090cd86 (patch) | |
tree | 472bd588c34f43f00a17b0387ac13a42e7b1afbc /contrib | |
parent | 3b8a064895aaef68fb615cf0287167aa3d3c6cfc (diff) | |
download | sssd-8ef1a136c1406bd1bab66e4ebf75b9375090cd86.tar.gz sssd-8ef1a136c1406bd1bab66e4ebf75b9375090cd86.tar.xz sssd-8ef1a136c1406bd1bab66e4ebf75b9375090cd86.zip |
CI: Preserve mock config timestamps
Preserve timestamps of mock configuration files when customizing them in
CI to avoid unnecessary cache rebuilds. This reduces CI run time.
Reviewed-by: Michal Židek <mzidek@redhat.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/ci/run | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/ci/run b/contrib/ci/run index c62b63799..9864818c6 100755 --- a/contrib/ci/run +++ b/contrib/ci/run @@ -144,8 +144,10 @@ function mock_privileged_conf() conf_dir=`mktemp --tmpdir --directory mock-config.XXXXXXXX` trap 'trap - RETURN; rm -R "$conf_dir";' RETURN - cp -r /etc/mock/* "$conf_dir"/ + # Preserve timestamps to avoid unnecessary cache rebuilds + cp -r --preserve=timestamps /etc/mock/* "$conf_dir"/ cat >> "${conf_dir}/${chroot}.cfg" + touch --reference="/etc/mock/${chroot}.cfg" "${conf_dir}/${chroot}.cfg" mock_privileged --configdir="$conf_dir" --root="$chroot" "$@" } |