]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - .gitlab-ci.yml
Fix translations
[github/Chocobozzz/PeerTube.git] / .gitlab-ci.yml
CommitLineData
2284f202
C
1image: chocobozzz/peertube-ci:10
2
3stages:
4 - build-and-lint
5 - test
4ba56322 6 - docker-nightly
2284f202 7
4ba56322
C
8#before_script:
9# - 'sed -i -z "s/database:\n hostname: ''localhost''/database:\n hostname: ''postgres''/" config/test.yaml'
10# - 'sed -i -z "s/redis:\n hostname: ''localhost''/redis:\n hostname: ''redis''/" config/test.yaml'
11# - if [[ $CI_JOB_STAGE == "test" ]]; then psql -c "create user peertube with password 'peertube';"; fi
12# - NOCLIENT=1 yarn install --pure-lockfile --cache-folder .yarn-cache
2284f202
C
13
14cache:
15 key: yarn
16 paths:
17 - .yarn-cache
18 - cached-fixtures
19
20###
21## Jobs templates
22#
23#.build-and-lint: &build-and-lint
24# stage: build-and-lint
25#
26#.tests: &tests
27# stage: test
28# dependencies:
29# - build-server
30# services:
31# - name: postgres:9.6
32# alias: postgres
33# - name: redis:latest
34# alias: redis
35# variables:
36# PGHOST: postgres
37# PGUSER: postgres
38# REDIS_HOST: redis
39# artifacts:
40# expire_in: 1 day
41# paths:
42# - test*/logs
43# when: always
44#
45####
46### Build and lint
47##
48#build-server:
49# <<: *build-and-lint
50# artifacts:
51# expire_in: 5h
52# paths:
53# - dist/
54# script:
55# - npm run build:server
56#
57#lint:
58# <<: *build-and-lint
59# script:
60# - yarn install --pure-lockfile --cache-folder .yarn-cache
61# - npm run ci -- "lint"
62#
63####
64### Tests
65#
66#test-misc:
67# <<: *tests
68# script:
69# - yarn install --pure-lockfile --cache-folder .yarn-cache
70# - npm run ci -- "misc"
71#
72#test-cli:
73# <<: *tests
74# retry:
75# max: 1
76# script:
77# - npm run ci -- "cli"
78#
79#api:
80# <<: *tests
81# parallel: 4
82# retry:
83# max: 1
84# script:
85# - NODE_PENDING_JOB_WAIT=1000 npm run ci -- api-$CI_NODE_INDEX
86
87build-nightly:
4ba56322 88 stage: docker-nightly
2284f202
C
89 only:
90 - schedules
91 script:
92 - yarn install --pure-lockfile --cache-folder .yarn-cache
93 - npm run nightly
94 - mkdir "${HOME}/.ssh"
95 - chmod 700 "${HOME}/.ssh"
96 - if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi
97 - eval `ssh-agent -s`
98 - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}"); fi
99 - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then scp ./peertube-nightly-* ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/nightly; fi
100
4ba56322
C
101.docker: &docker
102 stage: docker-nightly
103 image:
104 name: gcr.io/kaniko-project/executor:debug
105 entrypoint: [""]
106 before_script:
107 - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > /kaniko/.docker/config.json
108 script:
109 - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/support/docker/production/Dockerfile.stretch --destination $DOCKER_IMAGE_NAME
110
111build-docker-develop:
112 <<: *docker
113 only:
114 - schedules
4ba56322
C
115 variables:
116 DOCKER_IMAGE_NAME: chocobozzz/peertube:develop-stretch
117
118build-docker-tag:
119 <<: *docker
120 only:
121 - tags
122 variables:
123 DOCKER_IMAGE_NAME: chocobozzz/peertube:$CI_COMMIT_TAG-stretch
2e2c02b4
C
124
125build-docker-master:
126 <<: *docker
127 only:
128 - master
129 variables:
130 DOCKER_IMAGE_NAME: chocobozzz/peertube:production-stretch