Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NACSOS Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MCC APSIS
NACSOS
NACSOS Core
Commits
45cfce00
Commit
45cfce00
authored
2 years ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
update deployment info
parent
bea803f0
No related branches found
No related tags found
1 merge request
!38
Master
Pipeline
#1320
passed
2 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+9
-15
9 additions, 15 deletions
.gitlab-ci.yml
with
9 additions
and
15 deletions
.gitlab-ci.yml
+
9
−
15
View file @
45cfce00
...
...
@@ -26,7 +26,7 @@ stages:
build-job
:
stage
:
build
image
:
python:3.10.
9
image
:
python:3.10.
6
script
:
-
python -V
-
pip install virtualenv
...
...
@@ -40,14 +40,14 @@ build-job:
test-job1
:
stage
:
test
image
:
python:3.10.
9
image
:
python:3.10.
6
script
:
-
source venv/bin/activate
-
flake8 --config .flake8
test-job2
:
stage
:
test
image
:
python:3.10.
9
image
:
python:3.10.
6
script
:
-
source venv/bin/activate
-
which python
...
...
@@ -57,7 +57,7 @@ test-job2:
deploy-to-production
:
stage
:
deploy
tags
:
-
bare-metal
-
vm,
bare-metal
script
:
-
echo "Current working directory and user"
-
pwd
...
...
@@ -71,10 +71,9 @@ deploy-to-production:
-
git config --global user.email gitlab-runner@gitlab.pik-potsdam.de
-
git config --global -l --show-origin
-
echo "Go to deployment location"
-
cd /
home
/nacsos/nacsos-core
-
cd /
var/www
/nacsos
2
/nacsos-core
-
ls -lisah
-
sudo chown -R gitlab-runner /home/nacsos/nacsos-core
-
sudo chgrp -R gitlab-runner /home/nacsos/nacsos-core
-
sudo chown -R gitlab-runner:gitlab-runner /var/www/nacsos2/nacsos-core
-
ls -lisah
-
echo "Stopping NACSOS-core service"
-
sudo systemctl stop nacsos-core.service
...
...
@@ -91,16 +90,11 @@ deploy-to-production:
-
echo "Installing requirements"
-
pip install -r requirements.txt
-
echo "Handling migrations"
-
nacsos_migrate upgrade --revision head --root-path=/
home
/nacsos/nacsos-core/venv/lib/python3.10/site-packages/nacsos_data --ini-file=/
home
/nacsos/nacsos-core/config/alembic.ini
-
sudo chown -R nacsos /
home
/nacsos/nacsos-core
-
sudo chgrp -R nacsos /
home
/nacsos/nacsos-core
-
nacsos_migrate upgrade --revision head --root-path=/
var/www
/nacsos
2
/nacsos-core/venv/lib/python3.10/site-packages/nacsos_data --ini-file=/
var/www
/nacsos
2
/nacsos-core/config/alembic.ini
-
sudo chown -R nacsos /
var/www
/nacsos
2
/nacsos-core
-
sudo chgrp -R nacsos /
var/www
/nacsos
2
/nacsos-core
-
echo "Starting NACSOS-core service"
-
sudo systemctl start nacsos-core.service
# DEPRECATED
# - echo "Run as nacsos user"
# - sudo -u nacsos bash ./deploy.sh $CI_JOB_TOKEN
# - echo "Becoming 'nacsos' user"
# - sudo -u nacsos -s
when
:
manual
only
:
-
production
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