diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2cc9fe24a0238bb46dd8c2a50a6a3ec4ed6b01ca..743eacebc72e7966258fec2f433f5afe5e3d67dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,15 @@ image: ubuntu -build-job: - stage: build - script: - - echo "Hello, $GITLAB_USER_LOGIN!" - -test-job1: - stage: test - script: - - echo "this job tests fork1" - -test-job2: - stage: test - script: - - echo "this job tests fork2" - -deploy-prod: - stage: deploy - script: - - echo "this job tests fork3" +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 + +Test SSH: + script: + - ssh $USER_NAME "./scriptPull/pull.sh"