@@ -461,14 +461,20 @@ jobs:
461
461
exit $?
462
462
- run :
463
463
name : Clean working directory
464
- when : always
464
+ when : on_success
465
465
command : |
466
466
sudo chown $(id -un):$(id -gn) -R /tmp/ds005
467
- find /tmp/ds005/work -not -name "*.svg" -not -name "*.html" -not -name "*.rst" \
468
- -not -name "*.mat" -not -name "*.lta" -not -name "*.json" -not -name "*.txt" -not -name "*.pklz" -type f -delete
469
- find /tmp/ds005/work_partial -not -name "*.svg" -not -name "*.html" -not -name "*.rst" \
470
- -not -name "*.mat" -not -name "*.lta" -not -name "*.json" -not -name "*.txt" -not -name "*.pklz" -type f -delete
471
- # tar cf - work_partial/ | pigz -2 -p 2 > ds005_workdir.tar.gz && sudo rm -fr work work_partial
467
+ sudo rm -rf /tmp/ds005/work
468
+ sudo rm -rf /tmp/ds005/work_partial
469
+ - run :
470
+ name : Clean working directory
471
+ when : on_fail
472
+ command : |
473
+ sudo chown $(id -un):$(id -gn) -R /tmp/ds005
474
+ find /tmp/ds005/work \( -name "*.nii.gz" -or -name "*.nii" -or "*.gii" -or "*.h5" \) \
475
+ -exec sh -c 'rm -f {}; touch {}' \;
476
+ find /tmp/ds005/work_partial \( -name "*.nii.gz" -or -name "*.nii" -or "*.gii" -or "*.h5" \) \
477
+ -exec sh -c 'rm -f {}; touch {}' \;
472
478
473
479
- store_artifacts :
474
480
path : /tmp/ds005
@@ -587,13 +593,18 @@ jobs:
587
593
set -e
588
594
[[ "$RET" -eq "1" ]]
589
595
- run :
590
- name : Clean-up work directory
591
- when : always
596
+ name : Clean working directory
597
+ when : on_success
598
+ command : |
599
+ sudo chown $(id -un):$(id -gn) -R /tmp/ds054
600
+ sudo rm -rf /tmp/ds054/work
601
+ - run :
602
+ name : Clean working directory
603
+ when : on_fail
592
604
command : |
593
605
sudo chown $(id -un):$(id -gn) -R /tmp/ds054
594
- find /tmp/ds054/work -not -name "*.svg" -not -name "*.html" -not -name "*.rst" \
595
- -not -name "*.mat" -not -name "*.lta" -not -name "*.json" -not -name "*.txt" -not -name "*.pklz" -type f -delete
596
- # tar cf - work/ | pigz -2 -p 2 > ds054_workdir.tar.gz && sudo rm -fr work
606
+ find /tmp/ds054/work \( -name "*.nii.gz" -or -name "*.nii" -or "*.gii" -or "*.h5" \) \
607
+ -exec sh -c 'rm -f {}; touch {}' \;
597
608
- store_artifacts :
598
609
path : /tmp/ds054
599
610
@@ -685,13 +696,18 @@ jobs:
685
696
diff /tmp/src/fmriprep/.circleci/ds210_outputs.txt /tmp/ds210/test/outputs.out
686
697
exit $?
687
698
- run :
688
- name : Clean-up work directory
689
- when : always
699
+ name : Clean working directory
700
+ when : on_success
701
+ command : |
702
+ sudo chown $(id -un):$(id -gn) -R /tmp/ds210
703
+ sudo rm -rf /tmp/ds210/work
704
+ - run :
705
+ name : Clean working directory
706
+ when : on_fail
690
707
command : |
691
708
sudo chown $(id -un):$(id -gn) -R /tmp/ds210
692
- find /tmp/ds210/work -not -name "*.svg" -not -name "*.html" -not -name "*.rst" \
693
- -not -name "*.mat" -not -name "*.lta" -not -name "*.json" -not -name "*.txt" -not -name "*.pklz" -type f -delete
694
- # tar cf - work/ | pigz -2 -p 2 > ds054_workdir.tar.gz && sudo rm -fr work
709
+ find /tmp/ds210/work \( -name "*.nii.gz" -or -name "*.nii" -or "*.gii" -or "*.h5" \) \
710
+ -exec sh -c 'rm -f {}; touch {}' \;
695
711
- store_artifacts :
696
712
path : /tmp/ds210
697
713
0 commit comments