From 03e8bcc6f62a38322ef28d53f0c89d29434bc5dd Mon Sep 17 00:00:00 2001 From: Tibo <thibault.debatty@gmail.com> Date: Tue, 29 Oct 2019 14:50:16 +0100 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f6c80d..c2875a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,7 @@ +stages: + - test + - deploy + ## Cache composer packages between all jobs and all branches ## of this project... cache: @@ -8,6 +12,7 @@ cache: # Test with PHP7.2 test:php72: + stage: test image: cylab/php72 services: - mongo @@ -23,10 +28,20 @@ test:php72: - vendor/bin/phpcs test:gitleaks: + stage: test image: name: "zricethezav/gitleaks" entrypoint: [""] script: - gitleaks -v --repo-path=./ --config=gitleaks.toml - +# deploy only when pushed to branch master +# and tests succeeded +deploy: + stage: deploy + image: alpine + only: master + script: + - apk add wget + - wget "http://deployer.web-d.be/projects/19/deploy/CnyUff07McfEi7hQtHND7JWALkzKCmf4b4ddREUE" + -- GitLab