[英]Auto deploy with gitlab continuous integration
我想設置從gitlab分支到digitalocean液滴的自動部署。 我在droplet中創建了一個runner和exec git克隆。 但是現在我無法將gitlab-ci.yml配置為從分支“ dev”自動部署到Droplet。
我的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
如何連接到gitlab-ci.yml中的服務器以執行“ git pull”命令?
好的,我解決了問題。 首先,我們需要將GitLab CI運行器添加到服務器。 您可以在文檔中看到如何執行此操作。 然后,來自gitlab-ci.yml的所有命令將在服務器上執行。 所以,“混帳拉”命令也將在運動員開始在服務器上執行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.