.gitlab-ci.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. before_script:
  2. - "apt-get update -qq"
  3. - "apt-get upgrade -y"
  4. - "apt-get install -y --fix-missing git"
  5. # Install ssh-agent if not already installed, it is required by Docker.
  6. # (change apt-get to yum if you use a CentOS-based image)
  7. - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  8. # Run ssh-agent (inside the build environment)
  9. - eval $(ssh-agent -s)
  10. # Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
  11. - ssh-add <(echo "$DEPLOY_KEY")
  12. # For Docker builds disable host key checking. Be aware that by adding that
  13. # you are suspectible to man-in-the-middle attacks.
  14. # WARNING: Use this only with the Docker executor, if you use it with shell
  15. # you will overwrite your user's SSH config.
  16. - mkdir -p ~/.ssh
  17. - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
  18. # In order to properly check the server's host key, assuming you created the
  19. # SSH_SERVER_HOSTKEYS variable previously, uncomment the following two lines
  20. # instead.
  21. - mkdir -p ~/.ssh
  22. - '[[ -f /.dockerenv ]] && echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts'
  23. test:
  24. script:
  25. - "sh autogen.sh && ./configure && make && make install"
  26. update:
  27. script:
  28. - echo "merging from torgit"
  29. - git clone git@oniongit.eu:hiro/tor.git
  30. - "cd tor"
  31. - git remote add upstream https://git.torproject.org/tor.git
  32. - git checkout master
  33. - git config --global user.email "labadmin@oniongit.eu"
  34. - git config --global user.name "gitadmin"
  35. - git pull -Xtheirs upstream master
  36. - git push origin master