From e91661189b63aca41869aa645493e3c39f61e2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jev=20Bj=C3=B6rsell?= Date: Mon, 2 Mar 2020 16:57:29 -0800 Subject: [PATCH] Prevent IDE jobs running when the ide code has no changes --- .gitlab-ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3deaa2d9..671998b46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -224,9 +224,10 @@ run-webide-unit-tests: - cd tools/webide/packages/server - npm ci - npm run test - only: - changes: + rules: + - changes: - tools/webide/** + when: always build-publish-ide-image: stage: build_and_deploy @@ -246,7 +247,8 @@ build-publish-ide-image: . - docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - changes: + - tools/webide/** when: always - if: '$CI_COMMIT_REF_NAME == "dev"' when: always @@ -260,7 +262,8 @@ run-webide-e2e-tests: - export WEBIDE_IMAGE="${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}" - docker-compose run e2e rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - changes: + - tools/webide/** when: always - if: '$CI_COMMIT_REF_NAME == "dev"' when: always