diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0ee652985c40b0336ce5065caf7ee8f730070f4a..b7cedc3c91918494814c46a19eb98f2165d6ff87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -202,10 +202,10 @@ dockerize_TMSS: - cd SAS/TMSS/backend/test/oidc/docker-test-mozilla-django-oidc - docker build -t tmss_testprovider:$CI_COMMIT_SHORT_SHA -f dockerfiles/oidc_testprovider . - docker login -u $CI_NEXUS_REGISTRY_USERNAME -p $CI_NEXUS_REGISTRY_PASSWORD $CI_NEXUS_REGISTRY - - docker tag tmss_django:$CI_COMMIT_SHORT_SHA nexus.cep4.control.lofar:18080/tmss_django:$CI_COMMIT_SHORT_SHA - - docker push nexus.cep4.control.lofar:18080/tmss_django:$CI_COMMIT_SHORT_SHA - - docker tag tmss_testprovider:$CI_COMMIT_SHORT_SHA nexus.cep4.control.lofar:18080/tmss_testprovider:$CI_COMMIT_SHORT_SHA - - docker push nexus.cep4.control.lofar:18080/tmss_testprovider:$CI_COMMIT_SHORT_SHA + - docker tag tmss_django:$CI_COMMIT_SHORT_SHA $CI_NEXUS_REGISTRY_LOCATION/tmss_django:$CI_COMMIT_SHORT_SHA + - docker push $CI_NEXUS_REGISTRY_LOCATION/tmss_django:$CI_COMMIT_SHORT_SHA + - docker tag tmss_testprovider:$CI_COMMIT_SHORT_SHA $CI_NEXUS_REGISTRY_LOCATION/tmss_testprovider:$CI_COMMIT_SHORT_SHA + - docker push $CI_NEXUS_REGISTRY_LOCATION/tmss_testprovider:$CI_COMMIT_SHORT_SHA - docker logout $CI_NEXUS_REGISTRY interruptible: true needs: @@ -286,10 +286,11 @@ deploy-tmss-test: - chmod 644 ~/.ssh/known_hosts script: - ssh lofarsys@scu199.control.lofar "supervisorctl -u user -p 123 stop TMSS:*" - - ssh lofarsys@scu199.control.lofar "docker pull ${CI_NEXUS_REGISTRY}/tmss_testprovider:$CI_COMMIT_SHORT_SHA" - - ssh lofarsys@scu199.control.lofar "docker pull ${CI_NEXUS_REGISTRY}/tmss_django:$CI_COMMIT_SHORT_SHA" - - ssh lofarsys@scu199.control.lofar "docker tag ${CI_NEXUS_REGISTRY}/tmss_testprovider:$CI_COMMIT_SHORT_SHA ${CI_NEXUS_REGISTRY}/tmss_testprovider:latest" - - ssh lofarsys@scu199.control.lofar "docker tag ${CI_NEXUS_REGISTRY}/tmss_django:$CI_COMMIT_SHORT_SHA ${CI_NEXUS_REGISTRY}/tmss_django:latest" + - ssh lofarsys@scu199.control.lofar "docker pull ${CI_NEXUS_REGISTRY_LOCATION}/tmss_testprovider:$CI_COMMIT_SHORT_SHA" + - ssh lofarsys@scu199.control.lofar "docker pull ${CI_NEXUS_REGISTRY_LOCATION}/tmss_django:$CI_COMMIT_SHORT_SHA" + - ssh lofarsys@scu199.control.lofar "docker tag ${CI_NEXUS_REGISTRY_LOCATION}/tmss_testprovider:$CI_COMMIT_SHORT_SHA ${CI_NEXUS_REGISTRY_LOCATION}/tmss_testprovider:latest" + - ssh lofarsys@scu199.control.lofar "docker tag ${CI_NEXUS_REGISTRY_LOCATION}/tmss_django:$CI_COMMIT_SHORT_SHA nexus.cep4.control.lofar:18080/tmss_django:latest" + - ssh lofarsys@scu199.control.lofar "docker tag ${CI_NEXUS_REGISTRY_LOCATION}/tmss_django:$CI_COMMIT_SHORT_SHA tmss_django:latest" - ssh lofarsys@scu199.control.lofar "supervisorctl -u user -p 123 start TMSS:*" needs: - dockerize_TMSS diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py b/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py index d02ea21feeb351530421a95f27e7f305b6c2cb06..3fe7622b1df278cdf097ad3b09552d7282674d30 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py @@ -758,11 +758,11 @@ def create_cleanup_subtask_from_task_blueprint(task_blueprint: TaskBlueprint) -> subtask_data = {"start_time": None, "stop_time": None, "state": SubtaskState.objects.get(value=SubtaskState.Choices.DEFINING.value), - "task_blueprint": task_blueprint, "specifications_template": subtask_template, "specifications_doc": subtask_specs, "cluster": Cluster.objects.get(name=cluster_name)} subtask = Subtask.objects.create(**subtask_data) + subtask.task_blueprints.set([task_blueprint]) # step 2: create and link subtask input # for this cleanup subtask an 'input' seems a bit weird, but it actually makes sense!