diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 676679fa9..c7953f8fc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,22 +1,6 @@ include: - local: utils/gitlab-ci-common.yml -workflow: - rules: - # To avoid running too many pipelines, restrict the times we run one: - - # Run "trigger" pipelines - - if: '$CI_PIPELINE_SOURCE == "pipeline"' - - # Run pipelines triggered by a merge request creation/update - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - - # Run for pushes to a branch *except* if there is also a merge request for - # it. - - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS' - when: never - - if: '$CI_COMMIT_BRANCH' - variables: UPSTREAM_PROJECT : eng/libadalang/langkit @@ -43,15 +27,16 @@ build_and_test: when: never - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^sync\// when: never - # This shouldn't trigger from the upstream - - if: $CI_PIPELINE_SOURCE != "pipeline" + + # Run this for merge requests only + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' services: - image:sandbox - cpu:8 - mem:16 stage: single script: - - unset GITLAB_TOKEN; require_issue + - require_issue - !reference [.script_snippets, setup] # Download the langkit package diff --git a/utils/gitlab-ci-common.yml b/utils/gitlab-ci-common.yml index 80ebde865..5ff54435d 100644 --- a/utils/gitlab-ci-common.yml +++ b/utils/gitlab-ci-common.yml @@ -1,6 +1,7 @@ # Common items to create CIs for Libadalang-related projects .basic: + interruptible: true variables: ADASAT_GIT: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/eng/libadalang/adasat ANOD_GIT: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/eng/it/anod