Commit 4720be82 authored by Florent Chehab's avatar Florent Chehab

fix(ci): pipeline only on merge request

Now runs the pipeline only once a MR is open.

Fixes #83
parent 467f86da
Pipeline #36865 passed with stages
in 5 minutes
...@@ -16,8 +16,13 @@ variables: ...@@ -16,8 +16,13 @@ variables:
DB_HOST: postgres DB_HOST: postgres
DB_PORT: 5432 DB_PORT: 5432
.only-default: &only-default
only:
- master
- merge_requests
check_back: check_back:
<<: *only-default
stage: check stage: check
image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend
services: services:
...@@ -33,6 +38,7 @@ check_back: ...@@ -33,6 +38,7 @@ check_back:
- docker - docker
check_front: check_front:
<<: *only-default
stage: check stage: check
image: node:10.15.1-alpine image: node:10.15.1-alpine
cache: cache:
...@@ -46,6 +52,7 @@ check_front: ...@@ -46,6 +52,7 @@ check_front:
- docker - docker
test_back: test_back:
<<: *only-default
stage: test stage: test
image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend
services: services:
...@@ -61,6 +68,7 @@ test_back: ...@@ -61,6 +68,7 @@ test_back:
- docker - docker
test_frontend: test_frontend:
<<: *only-default
stage: test stage: test
image: node:10.15.1-alpine image: node:10.15.1-alpine
cache: cache:
...@@ -74,6 +82,7 @@ test_frontend: ...@@ -74,6 +82,7 @@ test_frontend:
- docker - docker
flake8: flake8:
<<: *only-default
stage: lint stage: lint
image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend
script: script:
...@@ -82,6 +91,7 @@ flake8: ...@@ -82,6 +91,7 @@ flake8:
- docker - docker
eslint: eslint:
<<: *only-default
stage: lint stage: lint
image: node:10.15.1-alpine image: node:10.15.1-alpine
cache: cache:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment