Mirror of PeerTube
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.

.gitlab-ci.yml 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. image: chocobozzz/peertube-ci:10
  2. stages:
  3. - clients
  4. - docker-nightly
  5. cache:
  6. key: yarn
  7. paths:
  8. - .yarn-cache
  9. - cached-fixtures
  10. build-openapi-clients:
  11. stage: clients
  12. only:
  13. refs:
  14. - master
  15. - schedules
  16. changes:
  17. - support/doc/api/openapi.yaml
  18. script:
  19. - apt-get update -qq
  20. - apt-get -yqqq install openjdk-8-jre
  21. - yarn install --pure-lockfile
  22. - scripts/openapi-peertube-version.sh
  23. - scripts/openapi-clients.sh
  24. build-nightly:
  25. stage: docker-nightly
  26. only:
  27. - schedules
  28. script:
  29. - yarn install --pure-lockfile --cache-folder .yarn-cache
  30. - npm run nightly
  31. - mkdir "${HOME}/.ssh"
  32. - chmod 700 "${HOME}/.ssh"
  33. - if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
  34. - eval `ssh-agent -s`
  35. - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}"); fi
  36. - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then scp ./peertube-nightly-* ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/nightly; fi
  37. .docker: &docker
  38. stage: docker-nightly
  39. cache: {}
  40. image:
  41. name: gcr.io/kaniko-project/executor:debug
  42. entrypoint: [""]
  43. before_script:
  44. - mkdir -p /kaniko/.docker
  45. - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > /kaniko/.docker/config.json
  46. script:
  47. - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/support/docker/production/Dockerfile.buster --destination $DOCKER_IMAGE_NAME
  48. build-docker-develop:
  49. <<: *docker
  50. only:
  51. - schedules
  52. variables:
  53. DOCKER_IMAGE_NAME: chocobozzz/peertube:develop-buster
  54. build-docker-tag:
  55. <<: *docker
  56. only:
  57. - tags
  58. variables:
  59. DOCKER_IMAGE_NAME: chocobozzz/peertube:$CI_COMMIT_TAG-buster
  60. build-docker-master:
  61. <<: *docker
  62. only:
  63. - master
  64. variables:
  65. DOCKER_IMAGE_NAME: chocobozzz/peertube:production-buster