.gitlab-ci.yml 416 Bytes
Newer Older
Muddsair Sharif's avatar
Muddsair Sharif committed
1
2
3
4
5
6
7
8
image: ubuntu

before_script:
  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  - eval $(ssh-agent -s)
  - echo "$SSH_PRIVATE_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
  - mkdir -p ~/.ssh
  - chmod 700 ~/.ssh
Muddsair Sharif's avatar
Muddsair Sharif committed
9
  - ssh-keyscan bwunicluster.scc.kit.edu > ~/.ssh/known_hosts
Muddsair Sharif's avatar
Muddsair Sharif committed
10
11
12
13
  - chmod 644 ~/.ssh/known_hosts

Test SSH:
    script:
Muddsair Sharif's avatar
Muddsair Sharif committed
14
    - ssh $USER_NAME "test/testscript.sh"