image: ubuntu

before_script:
  - echo "Hello, $GITLAB_USER_LOGIN!"
  #- curl ifconfig.me
  #- ip addr show
  #- apt-get install iproute2
  #- apt-file search --regexp 'bin/ip$'
  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  - eval $(ssh-agent -s)
  #
  #- apt-get install expect -y
  #- apt-get install sshpass
  #- sshpass -p $SSH_PASSPHRASE
  #- export SSH_ASKPASS=$SSH_PASSPHRASE
  - echo "$SSH_PRIVATE_KEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
  #- expect "Enter passphrase for (stdin):"
  #- send $SSH_PASSPHRASE
  - mkdir -p ~/.ssh
  - chmod 700 ~/.ssh
  - ssh-keyscan bwunicluster.scc.kit.edu > ~/.ssh/known_hosts
  - chmod 644 ~/.ssh/known_hosts
  - ssh $USER_NAME "pwd cd m4labhpc_test pwd"


Test SSH:
    script:
      - echo "test from fork"
