From 5df22e7e6aa86495b956a9da0c70d7d9e0ab0f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isabella=20Sko=C5=99epov=C3=A1?= <isabella@skorepova.info> Date: Wed, 6 Nov 2019 18:53:20 +0100 Subject: [PATCH] Delete preview as it does not work anyway --- .gitlab-ci.yml | 51 +------------------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88d8338c..734e08c6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,60 +1,11 @@ -image: node:8 +image: node:12 -stages: - - preview - - deployment - -# env vars: -# - PREVIEW_SSH_KEY -preview: - stage: preview - variables: - HTML_DIR: "/var/www/html/preview.ok1kvk.cz" - SSH_HOST: "preview-ok1kvk-cz@alfa.ok1kvk.cz" - environment: - name: preview/$CI_BUILD_REF_NAME - url: https://preview.ok1kvk.cz/$CI_BUILD_REF_NAME - on_stop: stop_preview - except: - - master - script: - - node --version - - rm -rf build - - mkdir -p fake_static - - npm ci - - node ./index.js --baseurl /$CI_BUILD_REF_NAME --contentdir . --staticdir fake_static --themedir theme --builddir build --noserver - - echo "$PREVIEW_SSH_KEY" > sshkey - - chmod 600 sshkey - - rsync -e 'ssh -i sshkey' -rc --delete build/ $SSH_HOST:$HTML_DIR/$CI_BUILD_REF_NAME/ - - ssh -i sshkey $SSH_HOST git -C $HTML_DIR/static/static/ pull - - ssh -i sshkey $SSH_HOST cp -asf $HTML_DIR/static/static/articles/. $HTML_DIR/$CI_BUILD_REF_NAME/clanek/ - - ssh -i sshkey $SSH_HOST ln -sf $HTML_DIR/static/static/images/ $HTML_DIR/$CI_BUILD_REF_NAME/ - - rm sshkey - -stop_preview: - stage: preview - variables: - HTML_DIR: "/var/www/html/preview.ok1kvk.cz" - SSH_HOST: "preview-ok1kvk-cz@alfa.ok1kvk.cz" - script: - - echo "$PREVIEW_SSH_KEY" > sshkey - - chmod 600 sshkey - - ssh -i sshkey $SSH_HOST "rm -rf $HTML_DIR/$CI_BUILD_REF_NAME/" - - rm sshkey - when: manual - environment: - name: preview/$CI_BUILD_REF_NAME - action: stop - except: - - master - # Needs following env vars: # - LFTP_PASSWORD # - DEPLOY_SSH_KEY deploy: tags: - docker - stage: deployment environment: deployment variables: HTML_DIR: "/html/www" -- GitLab