Skip to content
Snippets Groups Projects
Commit 0e8b677d authored by iaibrys's avatar iaibrys
Browse files

Use new depoyment scripts.

parent 46bbde54
No related branches found
No related tags found
No related merge requests found
Pipeline #382 passed
...@@ -64,16 +64,7 @@ deploy_devel: ...@@ -64,16 +64,7 @@ deploy_devel:
- deploy-devel - deploy-devel
stage: deploy stage: deploy
script: script:
- echo "Deploy to ${CI_BUILD_REF_SLUG} server" - /enote/src/dtu-enote/scripts/redeploy.sh ${CI_BUILD_REF_SLUG} ${CI_JOB_TOKEN} ${CI_REGISTRY} ${CI_PROJECT_PATH}
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- cd /enote/src/dtu-enote
- ../../gen/docker-stop.sh
- docker-compose -f ../../gen/docker-compose-enote.yml pull
- docker images | grep ${CI_PROJECT_PATH}
- ../../gen/docker-start.sh
- docker ps -q -f status=exited | xargs -I '{}' docker rm -f '{}'
- docker ps -q -f status=dead | xargs -I '{}' docker rm -f '{}'
- docker image prune -f
environment: environment:
name: develop name: develop
url: https://enote-devel3.compute.dtu.dk url: https://enote-devel3.compute.dtu.dk
...@@ -85,16 +76,7 @@ deploy_production: ...@@ -85,16 +76,7 @@ deploy_production:
- deploy-prod-2019 - deploy-prod-2019
stage: deploy stage: deploy
script: script:
- echo "Deploy to ${CI_BUILD_REF_SLUG} server" - /enote/src/dtu-enote/scripts/redeploy.sh ${CI_BUILD_REF_SLUG} ${CI_JOB_TOKEN} ${CI_REGISTRY} ${CI_PROJECT_PATH}
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- cd /enote/src/dtu-enote
- ../../gen/docker-stop.sh
- docker-compose -f ../../gen/docker-compose-enote.yml pull
- docker images | grep ${CI_PROJECT_PATH}
- ../../gen/docker-start.sh
- docker ps -q -f status=exited | xargs -I '{}' docker rm -f '{}'
- docker ps -q -f status=dead | xargs -I '{}' docker rm -f '{}'
- docker image prune -f
environment: environment:
name: production name: production
url: https://quiz.compute.dtu.dk url: https://quiz.compute.dtu.dk
......
...@@ -78,12 +78,15 @@ class QuizCourseConfig ...@@ -78,12 +78,15 @@ class QuizCourseConfig
quiz.quiz_path = quiz_file_basename quiz.quiz_path = quiz_file_basename
quiz.save quiz.save
return quiz_file_basename return quiz_file_basename
else
logger.error("failed to add_and_push #{quiz_file_path}")
end end
FileUtils.rm(quiz_file_path) FileUtils.rm(quiz_file_path)
quiz.delete # prevent file-less quiz from hanging around. quiz.delete # prevent file-less quiz from hanging around.
end else
logger.error("failed to copy #{template_filename} to #{quiz_file_path}") logger.error("failed to copy #{template_filename} to #{quiz_file_path}")
end
nil nil
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment