Commit afd19b7f authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF,RF: Fix some imports, basic health check command. Will make run tests when

there are tests to run. Unit test job runs on recipe repo
parent 998871db
......@@ -113,3 +113,22 @@ def lockdir(dirname):
fprint(f'Relinquishing lock on {dirname}')
os.close( fd)
os.unlink(lockfile)
def health_check():
"""Rudimentary health check of the fsl-ci-rules codebase. """
print(f'fsl-ci-rules version {__version__}')
import fsl_ci.conda
import fsl_ci.gitlab
import fsl_ci.scripts.build_conda_package
import fsl_ci.scripts.deploy_conda_package
import fsl_ci.scripts.trigger_package_build
import fsl_ci.scripts.update_conda_recipe
import fsl_ci.utils.configure_repositories
import fsl_ci.utils.create_conda_recipe
import fsl_ci.utils.fsl_project_dependencies
import fsl_ci.utils.package_status
import fsl_ci.utils.set_gitlab_variables
import fsl_ci.utils.trigger_build
import fsl_ci.utils.trigger_pipeline
......@@ -12,9 +12,9 @@ import os.path as op
import re
import sys
from fsl_ci_utils import sprun, tempdir, fprint
from fsl_ci import sprun, fprint
from fsl_ci.conda import load_meta_yaml
from fsl_ci_utils.conda import load_meta_yaml
def build_recipe(recipe_dir, repo, ref, output_dir, *channels):
"""Build the conda recipe in the given directory. """
......
......@@ -9,8 +9,8 @@
import os
from fsl_ci_utils.conda import get_recipe_urls
from fsl_ci_utils.gitlab_api import trigger_pipeline
from fsl_ci.conda import get_recipe_urls
from fsl_ci.gitlab import trigger_pipeline
def main():
......
......@@ -15,15 +15,15 @@ import os
import re
import sys
from fsl_ci_utils import (USERNAME,
EMAIL,
tempdir,
sprun,
is_valid_project_version)
from fsl_ci_utils.conda import get_recipe_urls
from fsl_ci_utils.gitlab_api import (http_request,
lookup_project_id,
open_merge_request)
from fsl_ci import (USERNAME,
EMAIL,
tempdir,
sprun,
is_valid_project_version)
from fsl_ci.conda import get_recipe_urls
from fsl_ci.gitlab import (http_request,
lookup_project_id,
open_merge_request)
GITLAB_URL = os.environ['CI_SERVER_URL']
......
......@@ -19,7 +19,7 @@ sanity-check:
rules:
- if: '$CI_PROJECT_PATH == "fsl/fsl-ci-rules"'
script:
- echo "Success!"
- fsl_ci_health_check
# This job template is extended by the jobs
......
......@@ -17,7 +17,7 @@ run-unit-tests:
rules:
- if: '$CI_COMMIT_TAG == null &&
$CI_PROJECT_PATH != "fsl/fsl-ci-rules" &&
$FSLCONDA_RECIPE == null &&
$FSLCONDA_RECIPE != null &&
$FSL_CI_SKIP_ALL == null &&
$FSL_CI_RULES_DISABLE == null &&
$FSL_CI_SKIP_TEST == null'
......
......@@ -35,6 +35,7 @@ setup(
packages=find_packages(),
include_package_data=True,
entry_points={'console_scripts' : [
'fsl_ci_health_check = fsl_ci:health_check',
'build_conda_package = fsl_ci.scripts.build_conda_package:main',
'deploy_conda_package = fsl_ci.scripts.deploy_conda_package:main',
'trigger_package_build = fsl_ci.scripts.trigger_package_build:main',
......
Supports Markdown
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