Commit 3cdeef7a authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Move project so that fsl-ci-rules can access the channel deploy runner

parent 40cb4d8c
......@@ -20,7 +20,7 @@ variables:
# URL to this repository - All CI jobs clone it,
# so that they have access to various scripts and
# utilities contained in the scripts directory.
CI_RULES_REPOSITORY: https://git.fmrib.ox.ac.uk/fsl/fsl-ci-rules.git
CI_RULES_REPOSITORY: https://git.fmrib.ox.ac.uk/fsl/conda/fsl-ci-rules.git
CI_RULES_BRANCH: master
# URL to the FSL public and internal conda channels,
......
......@@ -36,7 +36,7 @@ SERVER_URL = 'https://git.fmrib.ox.ac.uk'
"""Default gitlab instance URL, if not specified on the command.line."""
CUSTOM_CI_PATH = '.gitlab-ci.yml@fsl/fsl-ci-rules'
CUSTOM_CI_PATH = '.gitlab-ci.yml@fsl/conda/fsl-ci-rules'
"""Default custom CI configuration path to use if not specified on
command-line.
"""
......@@ -80,13 +80,13 @@ def patch_gitlab_ci_yml(project_path, server, token, ci_path):
changes_made = False
branch = 'ci/integrate-fsl-ci-rules-configure-repositories'
msg = f'CI: Integrate common fsl/fsl-ci-rules into ' \
msg = f'CI: Integrate common fsl/conda/fsl-ci-rules into ' \
f'{ciyml} pipelines (auto-generated fsl-ci-rules)'
mrmsg = tw.dedent(f"""
This merge request was triggered by an invocation of the
fsl/fsl-ci-rules/ci_utils/configure_repositories.py script.
fsl/conda/fsl-ci-rules/ci_utils/configure_repositories.py script.
It integrates the common FSL CI rules from the fsl/fsl-ci-rules
It integrates the common FSL CI rules from the fsl/conda/fsl-ci-rules
repository into the CI pipeline of this project ({project_path}).
Unfortunately it is difficult to preserve the formatting of a
......
......@@ -70,7 +70,7 @@ PLATFORM_CODES = {
"""Identifiers for all platforms, used in printed table."""
EXCLUDE = ['docs', 'installer', 'manifest', 'manifest-rules']
EXCLUDE = ['docs', 'installer', 'manifest', 'manifest-rules', 'fsl-ci-rules']
"""List of repositories in the fsl/conda/ gitlab namespace to ignore. """
......
......@@ -52,13 +52,13 @@ trigger-staging-package-build:
# FSL_CI_RULES_DISABLE is an undocumented
# legacy alias for FSL_CI_SKIP_ALL.
rules:
- if: '$CI_PROJECT_PATH != "fsl/fsl-ci-rules" &&
($CI_COMMIT_REF_NAME == "master" ||
$FSLCONDA_BUILD_ON_ALL_BRANCHES != null) &&
$CI_COMMIT_TAG == null &&
$CI_PIPELINE_SOURCE != "merge_request_event" &&
$FSLCONDA_RECIPE == null &&
$FSL_CI_RULES_DISABLE == null &&
- if: '$CI_PROJECT_PATH != "fsl/conda/fsl-ci-rules" &&
($CI_COMMIT_REF_NAME == "master" ||
$FSLCONDA_BUILD_ON_ALL_BRANCHES != null) &&
$CI_COMMIT_TAG == null &&
$CI_PIPELINE_SOURCE != "merge_request_event" &&
$FSLCONDA_RECIPE == null &&
$FSL_CI_RULES_DISABLE == null &&
$FSL_CI_SKIP_ALL == null'
script:
......@@ -79,11 +79,11 @@ update-conda-recipe:
# This job is only run on tags of a project repository.
rules:
- if: '$CI_COMMIT_TAG != null &&
$CI_PROJECT_PATH != "fsl/fsl-ci-rules" &&
$FSLCONDA_RECIPE == null &&
$FSL_CI_SKIP_ALL == null &&
$FSL_CI_RULES_DISABLE == null &&
- if: '$CI_COMMIT_TAG != null &&
$CI_PROJECT_PATH != "fsl/conda/fsl-ci-rules" &&
$FSLCONDA_RECIPE == null &&
$FSL_CI_SKIP_ALL == null &&
$FSL_CI_RULES_DISABLE == null &&
$FSLCONDA_SKIP_RECIPE_UPDATE == null'
script:
......
......@@ -80,7 +80,7 @@
if [ -f "${CONDADIR}"/activate ]; then source ${CONDADIR}/activate ${FSL_CI_CONFIG_DIR}/env;
else conda activate ${FSL_CI_CONFIG_DIR}/env; fi;
fi
- if [ "$CI_PROJECT_PATH" == "fsl/fsl-ci-rules" ]; then
- if [ "$CI_PROJECT_PATH" == "fsl/conda/fsl-ci-rules" ]; then
python -m pip install .;
else
for ((i=1; i<6; i++)); do
......
......@@ -7,7 +7,7 @@
# This job is just a sanity check which is only
# executed on the fsl/fsl-ci-rules repository.
# executed on the fsl/conda/fsl-ci-rules repository.
# Failure indicates an error somewhere in the
# fsl-ci-rules yml files.
test-ci-rules:
......@@ -18,8 +18,8 @@ test-ci-rules:
- fsl-ci
- docker
rules:
- if: '$CI_PROJECT_PATH == "fsl/fsl-ci-rules" &&
$CI_COMMIT_TAG == null &&
- if: '$CI_PROJECT_PATH == "fsl/conda/fsl-ci-rules" &&
$CI_COMMIT_TAG == null &&
$CI_PIPELINE_SOURCE != "merge_request_event"'
script:
- pip install pytest
......@@ -27,7 +27,7 @@ test-ci-rules:
# This job is only executed on the
# fsl/fsl-ci-rules repository, on
# fsl/conda/fsl-ci-rules repository, on
# non-master branches (i.e. merge request
# sources). It checks that the fsl_ci
# version number has been changed.
......@@ -38,9 +38,9 @@ check-version:
- fsl-ci
- docker
rules:
- if: '$CI_PROJECT_PATH == "fsl/fsl-ci-rules" &&
$CI_COMMIT_TAG == null &&
$CI_PIPELINE_SOURCE != "merge_request_event" &&
- if: '$CI_PROJECT_PATH == "fsl/conda/fsl-ci-rules" &&
$CI_COMMIT_TAG == null &&
$CI_PIPELINE_SOURCE != "merge_request_event" &&
$CI_COMMIT_BRANCH != "master"'
script:
- git fetch origin master
......@@ -80,7 +80,7 @@ check-version:
rules:
- if: '$BUILDDIR == null'
when: never
- if: '$CI_PROJECT_PATH == "fsl/fsl-ci-rules" &&
- if: '$CI_PROJECT_PATH == "fsl/conda/fsl-ci-rules" &&
$CI_COMMIT_REF_NAME == "master"'
when: manual
......@@ -135,9 +135,9 @@ purge-channel-indexes:
tags:
- fslconda-channel-host
rules:
- if: '$CI_PROJECT_PATH == "fsl/fsl-ci-rules" &&
$CI_COMMIT_TAG == null &&
$CI_COMMIT_REF_NAME == "master" &&
- if: '$CI_PROJECT_PATH == "fsl/conda/fsl-ci-rules" &&
$CI_COMMIT_TAG == null &&
$CI_COMMIT_REF_NAME == "master" &&
$CI_PIPELINE_SOURCE != "merge_request_event"'
when: manual
script:
......@@ -160,9 +160,9 @@ purge-channel-indexes:
DRY_RUN: "true"
rules:
- if: '$CI_PROJECT_PATH == "fsl/fsl-ci-rules" &&
$CI_COMMIT_TAG == null &&
$CI_COMMIT_REF_NAME == "master" &&
- if: '$CI_PROJECT_PATH == "fsl/conda/fsl-ci-rules" &&
$CI_COMMIT_TAG == null &&
$CI_COMMIT_REF_NAME == "master" &&
$CI_PIPELINE_SOURCE != "merge_request_event"'
when: manual
script:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment