.gitlab-ci.yml 758 Bytes
Newer Older
Muddsair Sharif's avatar
Muddsair Sharif committed
1
2
3
image: ubuntu

before_script:
Sintal's avatar
Sintal committed
4
  - echo "Hello, $GITLAB_USER_LOGIN!"
Sintal's avatar
Sintal committed
5
  #- ip addr show
Sintal's avatar
Sintal committed
6
7
  - apt-get install iproute2
  #- apt-file search --regexp 'bin/ip$'
Sintal's avatar
Sintal committed
8
9
  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  - eval $(ssh-agent -s)
Sintal's avatar
Sintal committed
10
  #- apt-get install expect -y
Sintal's avatar
Sintal committed
11
12
  #- apt-get install sshpass
  #- sshpass -p $SSH_PASSPHRASE
Sintal's avatar
Sintal committed
13
  #- export SSH_ASKPASS=$SSH_PASSPHRASE
Sintal's avatar
Sintal committed
14
  - echo "$SSH_PRIVATE_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
Sintal's avatar
Sintal committed
15
16
  #- expect "Enter passphrase for (stdin):"
  #- send $SSH_PASSPHRASE
Sintal's avatar
Sintal committed
17
18
19
20
21
  - mkdir -p ~/.ssh
  - chmod 700 ~/.ssh
  - ssh-keyscan bwunicluster.scc.kit.edu > ~/.ssh/known_hosts
  - chmod 644 ~/.ssh/known_hosts
  - ssh $USER_NAME "pwd"
Sintal's avatar
Sintal committed
22

Muddsair Sharif's avatar
Muddsair Sharif committed
23
24
25

Test SSH:
    script:
Sintal's avatar
Sintal committed
26
      - echo "test from fork"