2

I want to setup auto deployment from a gitlab branch to a digitalocean droplet. I created a runner and exec git clone in droplet. But now I can't configure my gitlab-ci.yml for autodeploy from branch "dev" to droplet.

My gitlab-ci.yml:

image: python:3.5
staging:
  type: deploy
  only:
  - dev
  script:
  # there must be some kind of connection to the droplet to further code executed already on server
  - git pull
  # - server restart

How do I connect to the server in gitlab-ci.yml to make "git pull" command?

2
  • i don't want it on digital ocean server, its a local windows server i have setup, Commented Oct 7, 2017 at 13:22
  • @Oliver, can you look in to the issue? Commented Oct 7, 2017 at 13:22

1 Answer 1

-1

Ok, I solved the problem. First, we need to add the GitLab CI runner to the server. You can see in the documentation how to do it. Then all commands from gitlab-ci.yml will execute on the server. So "git pull" command also will be executed on the server where the runner was started.

Sign up to request clarification or add additional context in comments.

1 Comment

what you meant is i have to install git ci runner on my local server? my local server have global static ip also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.