Refine usage of *job:tags* parameter.
authorM. Eric Irrgang <mei2n@virginia.edu>
Tue, 12 May 2020 14:20:41 +0000 (14:20 +0000)
committerM. Eric Irrgang <mei2n@virginia.edu>
Tue, 12 May 2020 14:20:41 +0000 (14:20 +0000)
Try to prevent jobs from getting stuck when they should be runnable
in GitLab forks or in the Gromacs CI environment when the Shared Runners
are turned off.

.gitlab-ci.yml
admin/gitlab-ci/archive.gitlab-ci.yml
admin/gitlab-ci/documentation.gitlab-ci.yml
admin/gitlab-ci/gromacs.gitlab-ci.yml
admin/gitlab-ci/lint.gitlab-ci.yml
admin/gitlab-ci/python-gmxapi.gitlab-ci.yml
admin/gitlab-ci/sample_restraint-regression.gitlab-ci.yml
admin/gitlab-ci/sample_restraint.gitlab-ci.yml
docs/dev-manual/gitlab.rst

index 60dd3c5c6aa81d31697cdfa7a0c28d19351c965c..99f0d28057063df0fd93e5f17305130eed9bcfd3 100644 (file)
@@ -37,10 +37,6 @@ stages:
   # Deploy stage for release builds
   - release-deploy
 
-default:
-  tags:
-    - k8s-scilifelab
-
 include:
   # Mix-in helper job definitions of general utility.
   - local: '/admin/gitlab-ci/global.gitlab-ci.yml'
index 4c6940364196b37fbdf42cfd59c0c929fe4889fe..cac89d8b98ea2c1a9457459a01ec9ce593707857 100644 (file)
@@ -9,14 +9,12 @@ prepare-release-version:
   # TODO: Get DockerFile for admin/dockerfiles
   image: biophysics/gcc-gromacs
   stage: configure-build
-
   variables:
     KUBERNETES_CPU_LIMIT: 1
     KUBERNETES_CPU_REQUEST: 1
     KUBERNETES_MEMORY_LIMIT: 2Gi
   script:
     - cmake -P cmake/gmxVersionInfo.cmake &> version.json
-
   artifacts:
     paths:
       - version.json
@@ -31,7 +29,6 @@ regressiontests:prepare:
   cache: {}
   image: biophysics/gcc-gromacs
   stage: configure-build
-
   variables:
     KUBERNETES_CPU_LIMIT: 1
     KUBERNETES_CPU_REQUEST: 1
@@ -67,7 +64,6 @@ regressiontests:package:
   # TODO: Get DockerFile for admin/dockerfiles
   image: biophysics/gcc-gromacs
   stage: release-package
-
   variables:
     KUBERNETES_CPU_LIMIT: 1
     KUBERNETES_CPU_REQUEST: 1
index 2a2e5bf3695223d186b472a2e1e647740353b616..35a8235b5614c852f5ac11675d522a6b3006ac31 100644 (file)
@@ -178,7 +178,6 @@ docs:configure:
   extends:
     - .docs:configure
     - .rules:basic-push
-  tags: []
   variables:
     BUILD_DIR: build-docs
     CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
@@ -206,7 +205,6 @@ docs:build:
     - .before_script:default
     - .rules:basic-push
   stage: documentation
-  tags: []
   needs:
     - job: docs:configure
   variables:
@@ -263,7 +261,6 @@ webpage:build:
     - .webpage:build
     - .rules:basic-push
   stage: post-test
-  tags: []
   needs:
     - job: docs:build
     - job: check-source
@@ -276,6 +273,8 @@ webpage:configure:
     - .docs:configure:release
     - .rules:nightly-only-for-release
   cache: {}
+  tags:
+    - k8s-scilifelab
   dependencies:
     - archive:package
     - regressiontests:package
@@ -293,6 +292,8 @@ webpage:dependencies:
     - .before_script:default
     - .rules:nightly-only-for-release
   stage: release-build
+  tags:
+    - k8s-scilifelab
   needs:
     - job: webpage:configure
   variables:
@@ -302,9 +303,11 @@ webpage:build:release:
   extends:
     - .webpage:build
     - .rules:nightly-only-for-release
+  stage: release-prepare-deploy
+  tags:
+    - k8s-scilifelab
   dependencies:
     - webpage:dependencies
     - webpage:configure
-  stage: release-prepare-deploy
   variables:
     BUILD_DIR: release-doc-builds
index 5e919e17389571386d3d121a7c978d6173e18583..baf9fc3dc91be59324f318d1717f494d90caac0c 100644 (file)
@@ -9,7 +9,6 @@ simple-build:
     - .rules:basic-push
   stage: pre-build
   image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
-  tags: []
   variables:
     KUBERNETES_CPU_LIMIT: 8
     KUBERNETES_CPU_REQUEST: 4
@@ -259,7 +258,7 @@ gromacs:clang-8:configure:
   variables:
     COMPILER_MAJOR_VERSION: 8
 
-gromacs:clang-9:configure:
+gromacs:clang-9-mpi:configure:
   extends:
    - .gromacs:base:configure
    - .use-clang:base
@@ -431,6 +430,8 @@ gromacs:clang-ASAN:build:
     - .use-ccache
     - .rules:merge-requests
   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-ASAN:configure
 
@@ -442,6 +443,8 @@ gromacs:clang-static-analyzer:build:
     - .use-ccache
     - .rules:merge-requests
   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-static-analyzer:configure
 
@@ -456,7 +459,7 @@ gromacs:clang-8:build:
   needs:
     - job: gromacs:clang-8:configure
 
-gromacs:clang-9:build:
+gromacs:clang-9-mpi:build:
   extends:
     - .variables:default
     - .gromacs:base:build
@@ -465,7 +468,7 @@ gromacs:clang-9:build:
     - .rules:merge-requests
   image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
   needs:
-    - job: gromacs:clang-9:configure
+    - job: gromacs:clang-9-mpi:configure
 
 gromacs:gcc-8-cuda-10.1:release:build:
   extends:
@@ -595,6 +598,8 @@ gromacs:gcc-7:test:
   variables:
     KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu"
     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:gcc-7:build
 
@@ -606,6 +611,8 @@ gromacs:gcc-8-cuda-10.1:test:
   variables:
     KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
     KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:gcc-8-cuda-10.1:build
 
@@ -633,16 +640,20 @@ gromacs:clang-ASAN:test:
   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
   variables:
     CTEST_RUN_MODE: "ExperimentalMemCheck"
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-ASAN:build
 
-gromacs:clang-9:test:
+gromacs:clang-9-mpi:test:
   extends:
     - .gromacs:base:test
     - .rules:merge-requests
   image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
+  tags:
+    - k8s-scilifelab
   needs:
-    - job: gromacs:clang-9:build
+    - job: gromacs:clang-9-mpi:build
 
 gromacs:gcc-7:regressiontest:
   extends:
@@ -655,6 +666,8 @@ gromacs:gcc-7:regressiontest:
     REGRESSIONTEST_PME_RANK_NUMBER: 0
     REGRESSIONTEST_TOTAL_RANK_NUMBER: 2
     REGRESSIONTEST_OMP_RANK_NUMBER: 1
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:gcc-7:build
     - job: regressiontests:prepare
@@ -670,6 +683,8 @@ gromacs:gcc-8-cuda-10.1:regressiontest:
     REGRESSIONTEST_PME_RANK_NUMBER: 0
     REGRESSIONTEST_TOTAL_RANK_NUMBER: 2
     REGRESSIONTEST_OMP_RANK_NUMBER: 1
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:gcc-8-cuda-10.1:build
     - job: regressiontests:prepare
@@ -679,6 +694,8 @@ gromacs:clang-8:regressiontest:
     - .gromacs:base:regressiontest
     - .rules:merge-requests
   image: gromacs/cmake-3.15.7-llvm-8-intelopencl-openmpi:2020
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-8:build
     - job: regressiontests:prepare
@@ -688,6 +705,8 @@ gromacs:clang-TSAN:regressiontest:
     - .gromacs:base:regressiontest
     - .rules:merge-requests
   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-TSAN:build
     - job: regressiontests:prepare
@@ -698,6 +717,8 @@ gromacs:clang-ASAN:regressiontest:
     - .use-clang:base
     - .rules:merge-requests
   image: gromacs/cmake-3.13.0-llvm-8-tsan:master
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-ASAN:build
     - job: regressiontests:prepare
@@ -710,8 +731,10 @@ gromacs:clang-9:regressiontest:
   variables:
     REGRESSIONTEST_DOUBLE: "-double"
     REGRESSIONTEST_PARALLEL: "-np"
+  tags:
+    - k8s-scilifelab
   needs:
-    - job: gromacs:clang-9:build
+    - job: gromacs:clang-9-mpi:build
     - job: regressiontests:prepare
 
 gromacs:gcc-8-cuda-10.1:release:test:
@@ -721,7 +744,11 @@ gromacs:gcc-8-cuda-10.1:release:test:
   stage: release-tests
   image: gromacs/cmake-3.15.7-gcc-8-cuda-10.1-nvidiaopencl-clfft-openmpi:master
   variables:
+    KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
+    KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
     BUILD_DIR: release-builds-gcc
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:gcc-8-cuda-10.1:release:configure
     - job: gromacs:gcc-8-cuda-10.1:release:build
@@ -757,7 +784,11 @@ gromacs:clang-8-cuda-10.1:release:test:
   stage: release-tests
   image: gromacs/cmake-3.15.7-llvm-8-cuda-10.1-openmpi:master
   variables:
+    KUBERNETES_EXTENDED_RESOURCE_NAME: "nvidia.com/gpu"
+    KUBERNETES_EXTENDED_RESOURCE_LIMIT: 1
     BUILD_DIR: release-builds-clang
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-8-cuda-10.1:release:configure
     - job: gromacs:clang-8-cuda-10.1:release:build
@@ -770,6 +801,8 @@ gromacs:gcc-7:release:regressiontest:
   image: gromacs/cmake-3.13.0-gcc-7-amdopencl-clfft-openmpi:master
   variables:
     BUILD_DIR: release-builds-gcc
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:gcc-7:release:build
     - job: regressiontests:package
@@ -784,6 +817,8 @@ gromacs:clang-9:release:regressiontest:
     BUILD_DIR: release-builds-clang
     REGRESSIONTEST_DOUBLE: "-double"
     REGRESSIONTEST_PARALLEL: "-np"
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-9:release:build
     - job: regressiontests:package
@@ -801,7 +836,8 @@ gromacs:clang-8-cuda-10.1:release:regressiontest:
     REGRESSIONTEST_PME_RANK_NUMBER: 0
     REGRESSIONTEST_TOTAL_RANK_NUMBER: 2
     REGRESSIONTEST_OMP_RANK_NUMBER: 1
-
+  tags:
+    - k8s-scilifelab
   needs:
     - job: gromacs:clang-8-cuda-10.1:release:build
     - job: regressiontests:package
index 2d56adecc30193baf4d5593c599f3edb1a7ed887..b0a7be87b61e2b0a43e9d53ae7f1d60d1ecf9d35 100644 (file)
@@ -6,7 +6,6 @@ clang-tidy:configure-push:
     - .use-clang:base
     - .rules:basic-push
   image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
-  tags: []
   variables:
     COMPILER_MAJOR_VERSION: 9
     BUILD_DIR: build-clang-tidy
@@ -18,7 +17,6 @@ clang-tidy:configure-schedule:
     - .use-clang:base
     - .rules:nightly-not-for-release
   image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
-  tags: []
   variables:
     COMPILER_MAJOR_VERSION: 9
     BUILD_DIR: build-clang-tidy
@@ -44,7 +42,6 @@ clang-tidy:test:
     - .rules:basic-push
   stage: source-check
   image: gromacs/cmake-3.15.7-llvm-9-openmpi:master
-  tags: []
   needs:
     - job: clang-tidy:configure-push
   variables:
@@ -79,7 +76,6 @@ clang-format:
   cache: {}
   stage: pre-build
   image: gromacs/ci-docs-llvm:master
-  tags: []
   variables:
     COMPILER_MAJOR_VERSION: 7
     KUBERNETES_CPU_LIMIT: 1
@@ -111,7 +107,6 @@ copyright-check:
   cache: {}
   stage: pre-build
   image: gromacs/ci-docs-llvm:master
-  tags: []
   variables:
     KUBERNETES_CPU_LIMIT: 1
     KUBERNETES_CPU_REQUEST: 1
@@ -147,7 +142,6 @@ check-source:
     - .rules:basic-push
   cache: {}
   stage: source-check
-  tags: []
   needs:
     - job: docs:build
       artifacts: true
index 4d51fe5935a82b8e9b9c6d658e4e2d44f9468532..c0467fe6d9549267c7299ee9ba9cb2d893427acb 100644 (file)
@@ -27,6 +27,9 @@
         - $PY_MPI_ACCEPTANCE_TEST_XML
     when: always
     expire_in: 1 week
+  tags:
+    - k8s-scilifelab
+  # The dependency means we need to use the same tag restriction as upstream.
   needs:
     - job: gromacs:clang-8:build
       artifacts: true
@@ -79,6 +82,9 @@ gmxapi-0.1:clang-8:py-3.8.2:
         - $PY_MPI_ACCEPTANCE_TEST_XML
     when: always
     expire_in: 1 week
+  tags:
+    - k8s-scilifelab
+  # The dependency means we need to use the same tag restriction as upstream.
   needs:
     - job: gromacs:clang-8:build
       artifacts: true
index 2b6885eb4de450e7d2fd72a7182cb35278d82e27..c1727331efba085c979e0eece5cedf7c51797743 100644 (file)
@@ -21,6 +21,9 @@
         - $PLUGIN_MPI_TEST_XML
     when: always
     expire_in: 1 week
+  tags:
+    - k8s-scilifelab
+  # The dependency means we need to use the same tag restriction as upstream.
   needs:
     # Note: if we want to run regression tests using artifacts from the `release-2020`
     # pipelines, we could specify *project* and *ref*, but initially we are only
index f4909bc61df8a31001c15a895d076f94f72a6894..94bae22feb21de9cb0e20cc33e17c94f13a96ce9 100644 (file)
@@ -19,6 +19,9 @@
         - $PLUGIN_MPI_TEST_XML
     when: always
     expire_in: 1 week
+  tags:
+    - k8s-scilifelab
+  # The dependency means we need to use the same tag restriction as upstream.
   needs:
     - job: gromacs:clang-8:build
       artifacts: true
index 8964a4b81cafc1307510b5950f5905e8fec06e8d..51852c3f4febadacad024026fdfa29899a58e752 100644 (file)
@@ -91,11 +91,16 @@ GitLab CI job parameters, but note the following GROMACS-specific conventions.
         to regular job definitions (don't use in "hidden" or parent jobs).
 
     tags
-        By `default <https://docs.gitlab.com/ee/ci/yaml/#setting-default-parameters>`__,
-        jobs require the ``k8s-scilifelab`` tag, which identifies Runners in the
-        |Gromacs| infrastructure. A small number of jobs in the first pipeline
-        stage override the default with an empty tag list so that all GitLab
-        users can run basic tests in their forked project.
+        Jobs that can only run in the |Gromacs| GitLab CI Runner infrastructure
+        should require the ``k8s-scilifelab`` tag.
+        These include jobs that specify Kubernetes configuration variables or
+        require special facilities, such as GPUs or MPI.
+        Note that the *tag* controls which Runners are eligible to take a job.
+        It does not affect whether the job is eligible for addition to a particular pipeline.
+        Additional *rules* logic should be used to make sure that jobs with the
+        ``k8s-scilifelab`` do not become eligible for pipelines launched outside
+        of the |Gromacs| project environment.
+        See, for instance, :term:`CI_PROJECT_NAMESPACE`
 
     variables
         Many job definitions will add or override keys in *variables*.