diff --git a/.gitignore b/.gitignore index 3f1d2a8e68a819c621bb2be951a4159ace5fdb30..2d76a9a3dfe8eb43503216c511348bc74911ad86 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ *.pem .ipynb_checkpoints/ +scripts/surveys/.creds diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 949f9e59e4cbe43cbc0793b6c4dae9ed143927c2..7b7595095b2b54f5299a078957fb547d49401caa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,8 @@ stages: lint_frontend: stage: lint + except: + - feat/cd image: node script: - cd frontend @@ -13,6 +15,8 @@ lint_frontend: lint_backend: stage: lint + except: + - feat/cd image: registry.gitlab.com/pipeline-components/black:latest script: - black --check --verbose -- . @@ -38,17 +42,6 @@ docker_deploy: only: - main - feat/cd - image: debian:latest - before_script: - - "command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )" - - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - - - mkdir -p ~/.ssh - - touch ~/.ssh/config - - touch ~/.ssh/known_hosts - - chmod -R 400 ~/.ssh - - ssh bridubois@languagelab.sipr.ucl.ac.be + image: alpine:latest script: - - cd /mnt/data/languagelab/repo/ - - git pull - - docker compose up -d + - echo "/mnt/data/languagelab/repo/scripts/update.sh" > /mnt/pipeline diff --git a/scripts/update.sh b/scripts/update.sh new file mode 100755 index 0000000000000000000000000000000000000000..030cb9aa6e26ca70aec33e3f56c3391217f7c684 --- /dev/null +++ b/scripts/update.sh @@ -0,0 +1,7 @@ +echo "STARTED UPDATE AT $(date)" > /tmp/docker_update +cd /mnt/data/languagelab/repo/ +git pull +docker compose up -d +cd scripts/surveys +python3 survey_maker.py < .creds +echo "END UPDATE AT $(date)" >> /tmp/docker_update