Brak opisu

.gitlab-ci.yml 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. before_script:
  2. - echo "executing before script"
  3. - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  4. ##
  5. ## Run ssh-agent (inside the build environment)
  6. ##
  7. - eval $(ssh-agent -s)
  8. ##
  9. ## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
  10. ## We're using tr to fix line endings which makes ed25519 keys work
  11. ## without extra base64 encoding.
  12. ## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
  13. ##
  14. - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
  15. ##
  16. ## Create the SSH directory and give it the right permissions
  17. ##
  18. - mkdir -p ~/.ssh
  19. - chmod 700 ~/.ssh
  20. - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
  21. - chmod 644 ~/.ssh/known_hosts
  22. - echo "$SSH_HOST" > ~/.ssh/config
  23. - chmod 644 ~/.ssh/config
  24. - git submodule sync --recursive
  25. - git submodule update --init
  26. ## Move pymap from the docker image to the tools folder
  27. - mkdir -p ../tools
  28. - rm -rf ../tools/v_tools
  29. - cp -r /sots-tools/v_tools ../tools
  30. stages:
  31. - build
  32. build-sots:
  33. stage: build
  34. only:
  35. - tags
  36. - web
  37. - triggers
  38. script:
  39. - echo "Building Pokémon SotS"
  40. - make -j4 all