summaryrefslogtreecommitdiffstats
path: root/.gitlab
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-30 16:43:05 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-30 19:00:56 (GMT)
commitff72dbfb14aeb0d5f71db9b72159d7d01aa4fde9 (patch)
tree4c773160ac16221093c1473fd299b7849792fd6c /.gitlab
parenta7afd8d3b0cd028c5cf85f7de6fbbc5e7605e863 (diff)
downloadCMake-ff72dbfb14aeb0d5f71db9b72159d7d01aa4fde9.zip
CMake-ff72dbfb14aeb0d5f71db9b72159d7d01aa4fde9.tar.gz
CMake-ff72dbfb14aeb0d5f71db9b72159d7d01aa4fde9.tar.bz2
gitlab-ci: configure rules to enable continuous builds of staged MRs
Configure rules to allow jobs for continuous builds to be enabled on a project that configures a specific branch this purpose.
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/ci/gitlab_ci.cmake6
-rw-r--r--.gitlab/rules.yml5
2 files changed, 11 insertions, 0 deletions
diff --git a/.gitlab/ci/gitlab_ci.cmake b/.gitlab/ci/gitlab_ci.cmake
index 7bd9300..7e5a7ab 100644
--- a/.gitlab/ci/gitlab_ci.cmake
+++ b/.gitlab/ci/gitlab_ci.cmake
@@ -49,6 +49,12 @@ endif ()
set(ctest_track "Experimental")
if (NOT "$ENV{CI_MERGE_REQUEST_ID}" STREQUAL "")
set(ctest_track "merge-requests")
+elseif (NOT "$ENV{CMAKE_CI_PROJECT_CONTINUOUS_BRANCH}" STREQUAL "" AND "$ENV{CMAKE_CI_PROJECT_CONTINUOUS_BRANCH}" STREQUAL "$ENV{CI_COMMIT_BRANCH}" AND NOT "$ENV{CMAKE_CI_JOB_CONTINUOUS}" STREQUAL "")
+ if (NOT "$ENV{CMAKE_CI_JOB_HELP}" STREQUAL "")
+ set(ctest_track "Continuous Help")
+ else()
+ set(ctest_track "Continuous")
+ endif()
elseif ("$ENV{CI_PROJECT_PATH}" STREQUAL "cmake/cmake")
if ("$ENV{CI_COMMIT_REF_NAME}" STREQUAL "master")
set(ctest_track "master")
diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml
index 87f8989..1edfd97 100644
--- a/.gitlab/rules.yml
+++ b/.gitlab/rules.yml
@@ -4,6 +4,9 @@
rules:
- if: '$CMAKE_CI_PACKAGE == "true"'
when: never
+ - if: '($CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != "" && $CI_COMMIT_BRANCH == $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true")'
+ when: delayed
+ start_in: 5 minutes
- if: '$CI_MERGE_REQUEST_ID'
when: manual
- if: '$CI_PROJECT_PATH == "cmake/cmake"'
@@ -15,6 +18,8 @@
rules:
- if: '$CMAKE_CI_PACKAGE == "true"'
when: never
+ - if: '($CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != "" && $CI_COMMIT_BRANCH == $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH && $CMAKE_CI_JOB_CONTINUOUS == "true")'
+ when: on_success
- if: '$CI_MERGE_REQUEST_ID'
when: on_success
- if: '$CI_PROJECT_PATH == "cmake/cmake"'