Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dtu-quiz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
enote
dtu-quiz
Commits
0e8b677d
Commit
0e8b677d
authored
6 years ago
by
iaibrys
Browse files
Options
Downloads
Patches
Plain Diff
Use new depoyment scripts.
parent
46bbde54
No related branches found
No related tags found
No related merge requests found
Pipeline
#382
passed
6 years ago
Stage: build
Stage: test
Stage: release
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+2
-20
2 additions, 20 deletions
.gitlab-ci.yml
app/models/quiz_course_config.rb
+4
-1
4 additions, 1 deletion
app/models/quiz_course_config.rb
with
6 additions
and
21 deletions
.gitlab-ci.yml
+
2
−
20
View file @
0e8b677d
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
app/models/quiz_course_config.rb
+
4
−
1
View file @
0e8b677d
...
@@ -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.
e
nd
e
lse
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment