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
aaf3758b
Commit
aaf3758b
authored
2 years ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
pass gitlab ci token
parent
837fd0cb
No related branches found
No related tags found
2 merge requests
!14
Server deployment
,
!10
pass gitlab ci token
Pipeline
#1000
canceled
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
deploy.sh
+4
-2
4 additions, 2 deletions
deploy.sh
with
5 additions
and
3 deletions
.gitlab-ci.yml
+
1
−
1
View file @
aaf3758b
...
@@ -52,7 +52,7 @@ deploy-to-production:
...
@@ -52,7 +52,7 @@ deploy-to-production:
-
bare-metal
-
bare-metal
script
:
script
:
-
echo "Run as nacsos user"
-
echo "Run as nacsos user"
-
sudo -u nacsos ./deploy.sh
-
sudo -u nacsos
bash
./deploy.sh
$CI_JOB_TOKEN
# - echo "Current working directory"
# - echo "Current working directory"
# - pwd
# - pwd
# - echo "Current user"
# - echo "Current user"
...
...
This diff is collapsed.
Click to expand it.
deploy.sh
+
4
−
2
View file @
aaf3758b
#!/bin/bash
set
-x
echo
"Current working directory"
echo
"Current working directory"
pwd
pwd
ls
-lisah
ls
-lisah
echo
"Current user"
whoami
whoami
echo
"Current groups"
groups
groups
echo
"Changing directory and making sure we landed there"
echo
"Changing directory and making sure we landed there"
...
@@ -18,6 +19,7 @@ echo "Dropping virtual environment"
...
@@ -18,6 +19,7 @@ echo "Dropping virtual environment"
rm
-rf
venv
rm
-rf
venv
echo
"Fetching updated source"
echo
"Fetching updated source"
git config url.
"https://gitlab-ci-token:
$1
@gitlab.pik-potsdam.de/"
.insteadOf
"ssh://git@gitlab.pik-potsdam.de/"
git stash
# "reset" softly by stashing (in case files changed)
git stash
# "reset" softly by stashing (in case files changed)
git pull origin production
# pull from origin (production branch)
git pull origin production
# pull from origin (production branch)
...
...
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