Make sure CI script can call /bin/env python`
authorM. Eric Irrgang <ericirrgang@gmail.com>
Thu, 14 May 2020 08:34:19 +0000 (11:34 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 14 May 2020 16:31:51 +0000 (16:31 +0000)
Before calling admin/clang-tidy.sh, make sure that the wrapped tool will
be able to find a Python interpreter.

Refs #3528

admin/gitlab-ci/lint.gitlab-ci.yml

index a283c5f5d69e85d566df74e48b6c85bbad69ccc8..6b6c48897b073500ea105faff04f7c1b83397e99 100644 (file)
@@ -52,6 +52,8 @@ clang-tidy:test:
     KUBERNETES_CPU_REQUEST: 2
     KUBERNETES_MEMORY_REQUEST: 4Gi
   script:
+    # 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`)
     - HEAD_REV=$(git show -s --pretty=format:"%h" HEAD)