Просмотр исходного кода

gitlab-ci: add sanity check to upload jobs

Ensure that the upload destination is not empty.
Brad King 3 лет назад
Родитель
Сommit
9a1b301c85
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      .gitlab/upload.yml

+ 2 - 0
.gitlab/upload.yml

@@ -16,6 +16,7 @@
         - dnf install -y --setopt=install_weak_deps=False rsync openssh-clients
         - chmod 400 $RSYNC_BINARY_KEY
         - ssh-keygen -y -f $RSYNC_BINARY_KEY > $RSYNC_BINARY_KEY.pub
+        - test -n "$RSYNC_DESTINATION"
         - rsync -tv --recursive -e "ssh -i $RSYNC_BINARY_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/ [email protected]:$RSYNC_DESTINATION/
 
     variables:
@@ -37,4 +38,5 @@
         - dnf install -y --setopt=install_weak_deps=False rsync openssh-clients
         - chmod 400 $RSYNC_HELP_KEY
         - ssh-keygen -y -f $RSYNC_HELP_KEY > $RSYNC_HELP_KEY.pub
+        - test -n "$RSYNC_DESTINATION"
         - rsync -tv --recursive --delete -e "ssh -i $RSYNC_HELP_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/html/ [email protected]:$RSYNC_DESTINATION/