]> granicus.if.org Git - esp-idf/commitdiff
handle the case that artifacts do not exist
authorYinling <heyinling@espressif.com>
Tue, 6 Dec 2016 08:22:33 +0000 (16:22 +0800)
committerYinling <heyinling@espressif.com>
Tue, 6 Dec 2016 11:01:20 +0000 (19:01 +0800)
.gitlab-ci.yml

index 0da685bd70234c98c0f4296f56a82eeec5049bb7..26f73085b00879ef128e9cafd3bbf6e917d0c386 100644 (file)
@@ -247,6 +247,8 @@ deploy_docs:
     expire_in: 6 mos
 
   script:
+    # remove artifacts from last stage (UT logs)
+    - rm -rf $LOG_PATH || echo "log folder not exist"
     # add gitlab ssh key
     - mkdir -p ~/.ssh
     - chmod 700 ~/.ssh
@@ -254,8 +256,6 @@ deploy_docs:
     - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
     - chmod 600 ~/.ssh/id_rsa
     - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
-    # remove artifacts from last stage (UT logs)
-    - rm $LOG_PATH
     # clone test bench
     - git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git
     - cd auto_test_script
@@ -270,6 +270,8 @@ deploy_docs:
     # can only be triggered
     - triggers
   script:
+    # remove artifacts from last stage (UT logs)
+    - rm -rf $LOG_PATH || echo "log folder not exist"
     # must be night build triggers, otherwise exit without test
     - test $NIGHT_BUILD = "Yes" || exit 0
     # add gitlab ssh key
@@ -279,8 +281,6 @@ deploy_docs:
     - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
     - chmod 600 ~/.ssh/id_rsa
     - echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
-    # remove artifacts from last stage (UT logs)
-    - rm $LOG_PATH
     # clone test bench
     - git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git
     - cd auto_test_script