Skip to content
Snippets Groups Projects
Commit 89c815e4 authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

Work on CI/CD

Add SSH pretest to check Private/Public key setting
parent b325e62f
No related branches found
No related tags found
No related merge requests found
......@@ -3,12 +3,29 @@
image: python:latest
stages:
- pretest
- build
- test
- coverage
- doc_build
- deploy
ssh:
stage: pretest:
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- 'which rsync || apt-get install rsync -y'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/gitlab_rsa
- echo "$SSH_PUBLIC_KEY" > ~/.ssh/gitlab_rsa.pub
script:
- ssh -p50022 bolirev@bioneuro77.biologie.uni-bielefeld.de "mkdir -p /fastdata/html/navipy/"
navipy_install:
stage: build
before_script:
......@@ -82,10 +99,13 @@ pages:
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- 'which rsync || apt-get install rsync -y'
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- '[[ -f /.dockerenv ]] && echo -e "Host *ntStrictHostKeyChecking nonn" > ~/.ssh/config'
- ssh-add <(echo "$PRIVATE_KEY")
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/gitlab_rsa
- echo "$SSH_PUBLIC_KEY" > ~/.ssh/gitlab_rsa.pub
script:
- ssh -p50022 bolirev@bioneuro77.biologie.uni-bielefeld.de "mkdir -p /fastdata/html/navipy/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment