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