@@ -67,17 +67,19 @@ list_env_dumps() {
67
67
pull_images () {
68
68
echo ' Pulling pre-built images.'
69
69
docker-compose pull --quiet
70
+
71
+ toc
70
72
71
- if docker pull " nextcloudcookbook/testci:php$PHP_VERSION " ; then
73
+ if docker pull --quiet " nextcloudcookbook/testci:php$PHP_VERSION " ; then
72
74
docker tag " nextcloudcookbook/testci:php$PHP_VERSION " cookbook_unittesting_dut
73
75
fi
76
+
77
+ toc
74
78
75
79
echo ' Pulling images finished.'
76
80
}
77
81
78
82
build_images () {
79
- pull_images
80
-
81
83
echo ' Building the images.'
82
84
local PROGRESS=' '
83
85
if [ -n " $CI " ]; then
@@ -192,6 +194,7 @@ shutdown_helpers(){
192
194
193
195
setup_server (){
194
196
echo ' Setup of the server environment.'
197
+ toc
195
198
196
199
echo " Checking out nextcloud server repository"
197
200
git clone --depth=1 --branch " $ENV_BRANCH " https://github.com/nextcloud/server volumes/nextcloud
@@ -201,6 +204,8 @@ setup_server(){
201
204
git submodule update --init
202
205
popd > /dev/null
203
206
207
+ toc
208
+
204
209
echo ' Creating cookbook folder for later bind-merge'
205
210
pushd volumes/nextcloud > /dev/null
206
211
mkdir -p custom_apps/cookbook data
@@ -773,15 +778,27 @@ printCI() {
773
778
fi
774
779
}
775
780
781
+ tic () {
782
+ TIC=$( date +%s.%3N)
783
+ }
784
+
785
+ toc () {
786
+ local TOC=$( date +%s.3N)
787
+ local diff=$( echo " scale=3; $TOC - $TIC " | bc)
788
+ # return "$diff"
789
+ printCI " Elapsed time: $diff seconds"
790
+ }
791
+
776
792
echo ' Starting process'
777
793
778
794
printCI " ::group::Prepare docker"
795
+ tic
779
796
780
797
if [ -n " $COPY_ENV_SRC " ]; then
781
798
copy_environment
782
799
fi
783
800
784
- if [ $DOCKER_PULL = ' y' ]; then
801
+ if [ $DOCKER_PULL = ' y' -o $CREATE_IMAGES = ' y ' -o $CREATE_IMAGES_IF_NEEDED = ' y ' ]; then
785
802
pull_images
786
803
fi
787
804
@@ -804,7 +821,9 @@ if [ $PUSH_IMAGES = 'y' ]; then
804
821
fi
805
822
806
823
printCI " ::endgroup::"
824
+ toc
807
825
printCI " ::group::Preparing environment"
826
+ tic
808
827
809
828
create_file_structure
810
829
@@ -827,7 +846,9 @@ if [ $SETUP_ENVIRONMENT = 'y' ]; then
827
846
fi
828
847
829
848
printCI " ::endgroup::"
849
+ toc
830
850
printCI " ::group::Environment dump handling"
851
+ tic
831
852
832
853
if [ $DROP_ENV_DUMP = ' y' ]; then
833
854
drop_env_dump
@@ -842,24 +863,31 @@ if [ $RESTORE_ENV_DUMP = 'y' ]; then
842
863
fi
843
864
844
865
printCI " ::endgroup::"
866
+ toc
845
867
printCI " ::group::Postprocessing environemnt preparation"
868
+ tic
846
869
847
870
if [ $START_HELPERS = ' y' ]; then
848
871
start_helpers_post
849
872
fi
850
873
851
874
printCI " ::endgroup::"
875
+ toc
852
876
877
+ tic
853
878
if [ $RUN_UNIT_TESTS = ' y' -o $RUN_INTEGRATION_TESTS = ' y' ]; then
854
879
run_tests " $@ "
855
880
fi
881
+ toc
856
882
857
883
printCI " ::group::Clean-Up"
884
+ tic
858
885
859
886
if [ $SHUTDOWN_HELPERS = ' y' ]; then
860
887
shutdown_helpers
861
888
fi
862
889
863
890
printCI " ::endgroup::"
891
+ toc
864
892
865
893
echo " Processing finished"
0 commit comments