p≡p engine fork for my own dirty testing of stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

  1. .ensure_docker: &ensure_docker
  2. # Check for docker and install if missing
  3. - 'which docker || ( sudo apt-get update -y && sudo apt-get install docker.io -y )'
  4. .ensure_rsync: &ensure_rsync
  5. # Install rsync and deps if missing
  6. - 'which ssh-agent || ( sudo apt-get update -y && sudo apt-get install openssh-client -y )'
  7. - 'which rsync || ( sudo apt-get update -y && sudo apt-get install rsync -y )'
  8. - 'which make || ( sudo apt-get update -y && sudo apt-get install make -y )'
  9. .enable_insecure_docker_registries: &enable_insecure_docker_registries
  10. # Enable "insecure" docker registries
  11. - |
  12. cat <<EOD > /tmp/docker-daemon.json
  13. {
  14. "insecure-registries" : ["${DOCKER_REGISTRY_HOST}"]
  15. }
  16. EOD
  17. - sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json
  18. - sudo systemctl restart docker.service
  19. .standard_job:
  20. tags: [kvm]
  21. before_script:
  22. - *ensure_docker
  23. - *ensure_rsync
  24. - *enable_insecure_docker_registries
  25. .make_in_docker:
  26. extends: .standard_job
  27. script:
  28. - docker login -u ${DOCKER_REGISTRY_USER} -p ${DOCKER_REGISTRY_PASS} ${DOCKER_REGISTRY_HOST}
  29. - cd scripts/${CI_DISTRO_TARGET}
  30. - make