.gitlab-ci.yml 836 Bytes
Newer Older
Sintal's avatar
Sintal committed
1
2
3
4
5
6
7
8
9
10
11
image: ubuntu

before_script:
  - echo "Hello, $GITLAB_USER_LOGIN!"
  - '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
  - ssh-keyscan bwunicluster.scc.kit.edu > ~/.ssh/known_hosts
  - chmod 644 ~/.ssh/known_hosts
Sintal's avatar
Sintal committed
12
  #
Sintal's avatar
Sintal committed
13
14
Test SSH:
    script:
Sintal's avatar
Sintal committed
15
      - GITLAB_KEY=$(echo "$GITLAB_KEY" | tr -d '\r' | tr -d '\n')
Sintal's avatar
Sintal committed
16
      - ssh $USER_NAME "mkdir -p execute_transformers"
Sintal's avatar
Sintal committed
17
      - scp exexute_transformers_for_sag.sh $USER_NAME:~/execute_transformers/exexute_transformers_for_sag.sh
Sintal's avatar
Sintal committed
18
      - ssh $USER_NAME "chmod 700 execute_transformers/exexute_transformers_for_sag.sh && sbatch --partition=dev_single ./execute_transformers/exexute_transformers_for_sag.sh $GITLAB_KEY"