diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e9c1898f3..7f142e129 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml | |||
@@ -3,7 +3,9 @@ image: chocobozzz/peertube-ci:10 | |||
3 | stages: | 3 | stages: |
4 | - build-and-lint | 4 | - build-and-lint |
5 | - test | 5 | - test |
6 | - clients | ||
6 | - docker-nightly | 7 | - docker-nightly |
8 | - external-plugins | ||
7 | 9 | ||
8 | #before_script: | 10 | #before_script: |
9 | # - 'sed -i -z "s/database:\n hostname: ''localhost''/database:\n hostname: ''postgres''/" config/test.yaml' | 11 | # - 'sed -i -z "s/database:\n hostname: ''localhost''/database:\n hostname: ''postgres''/" config/test.yaml' |
@@ -84,6 +86,21 @@ cache: | |||
84 | # script: | 86 | # script: |
85 | # - NODE_PENDING_JOB_WAIT=1000 npm run ci -- api-$CI_NODE_INDEX | 87 | # - NODE_PENDING_JOB_WAIT=1000 npm run ci -- api-$CI_NODE_INDEX |
86 | 88 | ||
89 | build-openapi-clients: | ||
90 | stage: clients | ||
91 | only: | ||
92 | refs: | ||
93 | - master | ||
94 | - schedules | ||
95 | changes: | ||
96 | - support/doc/api/openapi.yaml | ||
97 | script: | ||
98 | - apt-get update -qq | ||
99 | - apt-get -yqqq install openjdk-8-jre | ||
100 | - yarn install --pure-lockfile | ||
101 | - scripts/openapi-peertube-version.sh | ||
102 | - scripts/openapi-clients.sh | ||
103 | |||
87 | build-nightly: | 104 | build-nightly: |
88 | stage: docker-nightly | 105 | stage: docker-nightly |
89 | only: | 106 | only: |
@@ -105,6 +122,7 @@ build-nightly: | |||
105 | name: gcr.io/kaniko-project/executor:debug | 122 | name: gcr.io/kaniko-project/executor:debug |
106 | entrypoint: [""] | 123 | entrypoint: [""] |
107 | before_script: | 124 | before_script: |
125 | - mkdir -p /kaniko/.docker | ||
108 | - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > /kaniko/.docker/config.json | 126 | - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > /kaniko/.docker/config.json |
109 | script: | 127 | script: |
110 | - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/support/docker/production/Dockerfile.buster --destination $DOCKER_IMAGE_NAME | 128 | - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/support/docker/production/Dockerfile.buster --destination $DOCKER_IMAGE_NAME |
@@ -129,3 +147,31 @@ build-docker-master: | |||
129 | - master | 147 | - master |
130 | variables: | 148 | variables: |
131 | DOCKER_IMAGE_NAME: chocobozzz/peertube:production-buster | 149 | DOCKER_IMAGE_NAME: chocobozzz/peertube:production-buster |
150 | |||
151 | test-external-plugins: | ||
152 | stage: external-plugins | ||
153 | only: | ||
154 | - schedules | ||
155 | services: | ||
156 | - name: postgres:9.6 | ||
157 | alias: postgres | ||
158 | - name: redis:latest | ||
159 | alias: redis | ||
160 | - name: rroemhild/test-openldap | ||
161 | alias: ldap | ||
162 | variables: | ||
163 | POSTGRES_USER: peertube | ||
164 | POSTGRES_PASSWORD: "peertube" | ||
165 | POSTGRES_HOST_AUTH_METHOD: trust | ||
166 | REDIS_HOST: redis | ||
167 | artifacts: | ||
168 | expire_in: 1 day | ||
169 | paths: | ||
170 | - test*/logs | ||
171 | when: always | ||
172 | before_script: | ||
173 | - 'sed -i -z "s/database:\n hostname: ''localhost''/database:\n hostname: ''postgres''/" config/test.yaml' | ||
174 | - 'sed -i -z "s/redis:\n hostname: ''localhost''/redis:\n hostname: ''redis''/" config/test.yaml' | ||
175 | - NOCLIENT=1 yarn install --pure-lockfile --cache-folder .yarn-cache | ||
176 | script: | ||
177 | - npm run ci -- "external-plugins" | ||