Skip to content
Snippets Groups Projects
Commit aaf3758b authored by Tim Repke's avatar Tim Repke
Browse files

pass gitlab ci token

parent 837fd0cb
No related branches found
No related tags found
2 merge requests!14Server deployment,!10pass gitlab ci token
Pipeline #1000 canceled
...@@ -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"
......
#!/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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment