diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee018ed43ac6ee4c999b529a8107971fd9d26fcf..62698b27168fe49898ec1f4d0178a08a23a2d214 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -516,6 +516,30 @@ vf_to_phoenix: - y0054816 ############################################################################### +vf_wheel_to_jupyterhub: + stage: deploy + + needs: ["gcc_9_python", "gcc_9_unit_tests", "gcc_9_python_bindings_test"] + + variables: + HOST: "finrod.irmb.bau.tu-bs.de" + SSH_KEY: "$SSH_PRIVATE_KEY_JUPYTER_HOST_AT_FINROD" + REMOTE_USER: "jupyter_host" + + before_script: + - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' + - apt-get install -y rsync + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - eval $(ssh-agent -s) + - echo "$SSH_KEY" | tr -d '\r' | ssh-add - + - echo $SSH_KEY >> ansible/private_key + - ssh-keyscan -t rsa $HOST >> ~/.ssh/known_hosts + - pip3 install ansible + + script: + - ansible-playbook -i ansible/hosts.cfg -u $REMOTE_USER ansible/playbook_jupyter_update.yml + cppcheck_to_elladan: extends: .deploy_template stage: deploy diff --git a/ansible/hosts.cfg b/ansible/hosts.cfg index 160b8a1967c07bf852daa35ae0704fd9a63a77ec..0f340834c95ab66e9f5f2303129cec24ee180873 100644 --- a/ansible/hosts.cfg +++ b/ansible/hosts.cfg @@ -7,4 +7,4 @@ elladan.irmb.bau.tu-bs.de [gitlab_ci_deploy_gcov] elladan.irmb.bau.tu-bs.de [gitlab_ci_deploy_wheel] -finrod.irmb.bau.tu-bs.de \ No newline at end of file +finrod.irmb.bau.tu-bs.de ansible_ssh_private_key_file=~/private_key ansible_become_password="{{ lookup('env', 'ANSIBLE_JUPYTER_HOST_BECOME_PASSWORD') }}" \ No newline at end of file diff --git a/ansible/playbook_jupyter_update.yml b/ansible/playbook_jupyter_update.yml index 4e5f6a9c53960e97f5157f874e4b2cad0641eb7a..61d6c95aff09fc99d9a2f3c1418c6e38f52e464b 100644 --- a/ansible/playbook_jupyter_update.yml +++ b/ansible/playbook_jupyter_update.yml @@ -1,4 +1,4 @@ -- hosts: local +- hosts: gitlab_ci_deploy_wheel vars: host_home: "/home/{{ lookup('env', 'jupyter_host') }}"