.gitlab-ci.yml 2.55 KB
Newer Older
1
image: lofareosc/prefactor-ci:latest
2

mancini's avatar
mancini committed
3 4
variables:
  TEST_DATASET_NAME: "L570745_uv_first10.MS.tar.xz"
mancini's avatar
mancini committed
5 6
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

mancini's avatar
mancini committed
7
stages:
mancini's avatar
mancini committed
8 9
  - build_docker
  - push_docker
mancini's avatar
mancini committed
10
  - validate_cwl_scripts
mancini's avatar
mancini committed
11 12 13
  - test_steps
  - integration_test

mancini's avatar
mancini committed
14
before_script:
mancini's avatar
mancini committed
15 16
   - mkdir workdir
   - mkdir logs
mancini's avatar
mancini committed
17 18 19

after_script:
  - echo "All done"
mancini's avatar
mancini committed
20

mancini's avatar
mancini committed
21 22 23
build_docker:
  image: docker:latest
  stage: build_docker
mancini's avatar
mancini committed
24 25
  only:
    - tags
mancini's avatar
mancini committed
26 27 28 29
  script:
    - apk add git subversion git-lfs bash
    - cd Docker
    - bash build_docker.sh
mancini's avatar
mancini committed
30

mancini's avatar
mancini committed
31
push_docker_tags:
mancini's avatar
mancini committed
32
  image: docker:latest
mancini's avatar
mancini committed
33
  allow_failure: true
mancini's avatar
mancini committed
34
  stage: push_docker
mancini's avatar
mancini committed
35
  only:
mancini's avatar
mancini committed
36
    - tags
mancini's avatar
mancini committed
37
  script:
mancini's avatar
mancini committed
38
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
mancini's avatar
mancini committed
39 40
    - docker tag lofareosc/prefactor-ci:latest $CI_REGISTRY/prefactor-ci:$CI_COMMIT_REF_NAME
    - docker push $CI_REGISTRY/prefactor-ci:$CI_COMMIT_REF_NAME
mancini's avatar
mancini committed
41

mancini's avatar
mancini committed
42
validate_scripts:
mancini's avatar
mancini committed
43 44
  stage: validate_cwl_scripts
  script:
mancini's avatar
mancini committed
45
    - for file in `find . -name 'steps/*.cwl'`; do cwltool --validate $file; done
mancini's avatar
mancini committed
46

47 48 49 50
find_skymodel_cal:
  stage: test_steps
  allow_failure: true
  script:
Tammo Jan Dijkema's avatar
Tammo Jan Dijkema committed
51
    - cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH steps/find_skymodel_cal.cwl test_jobs/find_skymodel_cal.json
52 53 54 55 56 57 58

blsmooth:
  stage: test_steps
  allow_failure: true
  script:
    - cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH steps/blsmooth.cwl test_jobs/blsmooth.json

59 60 61
pol_align:
  stage: integration_test
  script:
mancini's avatar
mancini committed
62
    - cwltool --no-container subworkflow/pol_align.cwl test_jobs/pol_align.json
63

mancini's avatar
mancini committed
64 65 66 67 68
faraday_rotation:
  stage: integration_test
  script:
    - cwltool --no-container --preserve-entire-environment subworkflow/faraday_rotation.cwl test_jobs/faraday_rotation.json

mancini's avatar
mancini committed
69
prefactor_calibrator:
70
  stage: integration_test
mancini's avatar
mancini committed
71
  script:
mancini's avatar
mancini committed
72
    - cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH workflows/prefactor_calibrator.cwl test_jobs/integration_test_prefactor_calibrator.json
73

Tammo Jan Dijkema's avatar
Tammo Jan Dijkema committed
74 75 76
toil:
  stage: integration_test
  script:
mancini's avatar
mancini committed
77
    - toil-cwl-runner --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH --jobStore jobstore --writeLogs logs --workDir workdir workflows/prefactor_calibrator.cwl test_jobs/integration_test_prefactor_calibrator.json
Tammo Jan Dijkema's avatar
Tammo Jan Dijkema committed
78

mancini's avatar
mancini committed
79
flag_average:
80
  stage: integration_test
mancini's avatar
mancini committed
81
  script:
mancini's avatar
mancini committed
82
    - cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH test_workflow/flag_average.cwl test_jobs/flag_average.json