diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..6539e7cd315c955bf81554f92b4992699fad92b1 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,31 @@ +stages: # List of stages for jobs, and their order of execution + - build + - integration_test + - deploy + +variables: + DOCKER_TAG: "latest" + + +.step-with-docker-tag: + rules: + - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH + variables: + DOCKER_TAG: $CI_COMMIT_REF_SLUG + - if: '$CI_COMMIT_TAG != null' + variables: + DOCKER_TAG: $CI_COMMIT_TAG + - if: '$CI_COMMIT_TAG == null' + variables: + DOCKER_TAG: latest + +build-container: + extends: + - .step-with-docker-tag + stage: build + before_script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + + script: + - docker build -t $CI_REGISTRY_IMAGE/ms_tools:$DOCKER_TAG . + - docker push $CI_REGISTRY_IMAGE/ms_tools:$DOCKER_TAG diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..565271d0caf53ae3167c6b098fcdb1caac07d910 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM astronrd/linc + +COPY ./ /src +RUN cd /src && \ + python3 -m pip install . + + +RUN lofar_sip_from_ms.py --help && \ + lofar_sip_merge.py --help \ No newline at end of file diff --git a/bin/lofar_sip_from_ms.py b/bin/lofar_sip_from_ms.py index 2071aa88dc361dc5315e5af717619bb364ca53d3..631058e09a11100fd5014ac154b08bea5f4b8b77 100755 --- a/bin/lofar_sip_from_ms.py +++ b/bin/lofar_sip_from_ms.py @@ -34,7 +34,8 @@ def collect_project_info(msin): _storage_writer_to_storage_manager = { 'DyscoStMan': 'DyscoStorageManager', - 'TiledColumnStMan': 'CasaStorageManagers' + 'TiledColumnStMan': 'CasaStorageManager', + 'LofarStMan': 'LOFARStorageManager' } _DAYS_IN_SEC = 3600 * 24