Update CI rules for release-2021
authorPaul Bauer <paul.bauer.q@gmail.com>
Tue, 20 Oct 2020 14:09:51 +0000 (14:09 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Tue, 20 Oct 2020 14:09:51 +0000 (14:09 +0000)
Changes rules to target release-2021 branch instead of master.
Update regressiontest download branch.

admin/gitlab-ci/archive.gitlab-ci.yml
admin/gitlab-ci/global.gitlab-ci.yml
admin/gitlab-ci/lint.gitlab-ci.yml
admin/gitlab-ci/rules.gitlab-ci.yml
cmake/gmxVersionInfo.cmake

index 15877d35ae55bfa99e6ae77b8f641326f6626f1d..a3b1acd48bae54a000c98ce23f975cab5dd9a43d 100644 (file)
@@ -33,9 +33,9 @@ regressiontests:prepare:
     KUBERNETES_CPU_LIMIT: 1
     KUBERNETES_CPU_REQUEST: 1
     KUBERNETES_MEMORY_REQUEST: 2Gi
-  # Always clone the default version for this branch, master in this case
+  # Always clone the default version for this branch, 2021 in this case
   script:
-    - export REGTESTBRANCH=master
+    - export REGTESTBRANCH=release-2021
     - if [[ ! -z $REGRESSIONTESTBRANCH ]] ; then
       export REGTESTBRANCH=$REGRESSIONTESTBRANCH ;
       echo "Using $REGTESTBRANCH instead of default" ;
@@ -86,7 +86,7 @@ regressiontests:package:
     - if [[ $GROMACS_RELEASE != "true" ]] ; then
       REGTESTNAME=$REGTESTNAME-dev ;
       fi
-    - export REGTESTBRANCH=master
+    - export REGTESTBRANCH=release-2021
     - if [[ $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "release-20"[1-2][0-9] ]] ; then
       export REGTESTBRANCH=$CI_COMMIT_REF_NAME ;
       fi
index 2463fa96b43269894b04ab2cc947fa9171e4f116..d7eb86ac1207b3c4be98a2d0c98823a71b4ffbe9 100644 (file)
@@ -15,7 +15,7 @@
     KUBERNETES_MEMORY_LIMIT: 8Gi
     KUBERNETES_EXTENDED_RESOURCE_NAME: ""
     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 0
-    CACHE_FALLBACK_KEY: "$CI_JOB_NAME-$CI_JOB_STAGE-master"
+    CACHE_FALLBACK_KEY: "$CI_JOB_NAME-$CI_JOB_STAGE-release-2021"
     BUILD_DIR: build
     INSTALL_DIR: install
     CMAKE_GMXAPI_OPTIONS: ""
index c750d2ca7315aeb8a72d1d1d26d9ebff90a62373..95c0719d0e3571ae2a5088b578621348b4309664 100644 (file)
@@ -55,7 +55,7 @@ clang-tidy:test:
     # Make sure that a Python interpreter can be found for `/bin/env python`
     - test -x /usr/bin/python || update-alternatives --install /usr/bin/python python /usr/bin/python3 1
     # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
-    - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
+    - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2021 && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
     - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
     - if [[ "$REV" == "$HEAD_REV" ]] ; then
         REV="HEAD~1" ;
@@ -85,8 +85,7 @@ clang-format:
     KUBERNETES_MEMORY_REQUEST: 2Gi
     EXTRA_INSTALLS: clang-format-$COMPILER_MAJOR_VERSION
   script:
-    # TODO (issue #3272) `master` is not appropriate for use on release-xxxx branches, how should we handle that?
-    - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git master && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
+    - REV=$(git fetch -q https://gitlab.com/gromacs/gromacs.git release-2021 && git show -s --pretty=format:"%h" `git merge-base FETCH_HEAD HEAD`)
     - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)
     - if [[ "$REV" == "$HEAD_REV" ]] ; then
         REV="HEAD~1" ;
index 7bf1648b47f83a2508677c5ea10e9a723e99854d..c53451100649921494646057d2fb0d12d021778c 100644 (file)
 .rules-element:if-post-merge-acceptance-or-mr-then-always: &if-post-merge-acceptance-or-mr-then-always
   if: '$CI_PIPELINE_SOURCE == "merge_request_event" ||
        ($CI_PIPELINE_SOURCE == "push" &&
-        $CI_COMMIT_REF_NAME == "master")'
+        $CI_COMMIT_REF_NAME == "release-2021")'
   when: always
 
 # Include job only for post submit push
 .rules-element:if-post-merge-acceptance-then-always: &if-post-merge-acceptance-then-always
   if: '$CI_PIPELINE_SOURCE == "push" &&
-       $CI_COMMIT_REF_NAME == "master"'
+       $CI_COMMIT_REF_NAME == "release-2021"'
   when: always
 
 # When composing a rule set, note that the first matching rule is applied.
     - *if-schedule-then-always
     - *if-mr-then-always
 
+# Jobs that run for merge requests and schedules for branch `release-2021`,
+# but not when GROMACS_RELEASE is set.
+# Excludes non-gromacs projects.
+.rules:merge-requests:release-2021:
+  rules:
+    - *if-not-gromacs-then-never
+    - *if-release-then-never
+    - *if-post-merge-acceptance-then-never
+    # This next rule catches "push" and other events in branches other than `release-2021`
+    # but allows merge_request_events for merge requests targeting `release-2021`.
+    # This rule is before "web" so the web interface won't include jobs that can't succeed
+    # (and would not ordinarily be run). Such jobs are hard to identify in a way that is
+    # sufficiently general for a global rules definition.
+    # If extra coverage is needed through a web-triggered job in merge request branches,
+    # we could provide an additional short-circuiting rule based on an environment variable
+    # to be provided through the web interface.
+    - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "release-2021" && $CI_COMMIT_REF_NAME != "release-2021"'
+      when: never
+    - *if-web-then-always
+    - *if-schedule-then-always
+    - *if-mr-then-always
+
 # Rule to run a job only in nightly release-preparation pipelines.
 # Checks if the GROMACS_RELEASE variable was set (typically through the GitLab web interface).
 # Excludes merge_requests and non-gromacs projects.
index 005ede6bc09d86a4515785a3b6aa4d15f95fd41c..3fa0b1ce31a37d34efb1da74ff8588092e6c4a03 100644 (file)
@@ -256,7 +256,7 @@ if (NOT SOURCE_IS_SOURCE_DISTRIBUTION AND
 endif()
 
 set(REGRESSIONTEST_VERSION "${GMX_VERSION_STRING}")
-set(REGRESSIONTEST_BRANCH "master") # TODO branch to 2021
+set(REGRESSIONTEST_BRANCH "release-2021") 
 # Run the regressiontests packaging job with the correct pakage
 # version string, and the release box checked, in order to have it
 # build the regressiontests tarball with all the right naming. The