From 340be852e2d4a85b733d149176092dd73a06c2b3 Mon Sep 17 00:00:00 2001 From: Sintal <61sima1bif@hft-stuttgart.de> Date: Fri, 7 May 2021 14:51:59 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2cc9fe2..743eace 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" -- GitLab