diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0b49fe0..270c4626 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,6 +117,16 @@ get_data: - ln -s "${LOCAL_DATA_PATH}/sim_output" "${DETECTOR_CONFIG}/sim_output" - ln -s "../results" "${DETECTOR_CONFIG}/results" - mkdir -p "$SNAKEMAKE_OUTPUT_CACHE" + - stat -c %x,%z,%n * + # GitLab CI will have new timestamps in each job, which messes with + # Snakemake outdated file detection. This resets file timestamps according + # to latest modification in git. + - | + for file in $(git ls-files); do + time="$(git log --pretty=format:%cd -n 1 --date=format:%Y%m%d%H%M.%S --date-order -- "$file")" + touch -m -t "$time" "$file" + done + - stat -c %x,%z,%n * - ls -lrtha retry: max: 2