diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2c931f12de8d219a35fa6808f288b51f9b3c0c14 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +image: kroniak/ssh-client + +stages: + - deploy + +home: + stage: deploy + before_script: + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - echo "$SSH" | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh/socket + - chmod 700 ~/.ssh + - cp .magic_ssh_config ~/.ssh/config + script: + - ssh mikewashere@centaur.sch.bme.hu "cp /afs/sch.bme.hu/home/mikewashere/.system/mikewashere.keytab /tmp/; kinit -k -t /tmp/mikewashere.keytab mikewashere; rm /tmp/mikewashere.keytab; aklog sch.bme.hu -k SCH.BME.HU" + - ssh mikewashere@centaur.sch.bme.hu mkdir -p ~/public_html/linux + - scp -R . mikewashere@centaur.sch.bme.hu:~/public_html/linux/. + only: + refs: + - master \ No newline at end of file diff --git a/.magic_ssh_config b/.magic_ssh_config new file mode 100644 index 0000000000000000000000000000000000000000..72ebfe24e8565885ca9eb57574b05d92127a7567 --- /dev/null +++ b/.magic_ssh_config @@ -0,0 +1,7 @@ +Host centaur.sch.bme.hu + StrictHostKeyChecking no + ControlMaster auto + ControlPersist yes + ControlPath ~/.ssh/socket/%r@%h:%p + RequestTTY yes + SecurityKeyProvider internal \ No newline at end of file