我想设置自动部署从一个gitlab分支到一个数字海洋液滴。我用液滴创造了一个跑步者和执行git克隆人。但现在我无法配置我的gitlab-ci.yml,以便从分支"dev“自动部署到液滴。
我的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
#
场景
创建一个安装了转轮的新虚拟机
触发(从另一个项目)运行的管道,该管道在这个新虚拟机上运行
如果上面的管道在新虚拟机上失败,则执行其他操作,或者失败。
问题
我正在使用GitLabs触发器API从一个项目运行管道,但是希望它能在这个新创建的虚拟机上运行。
将这些信息解析为GitLab API的最好方法是什么,或者像标记这样的东西是最好的方法吗?
.gitlab-ci.yml
stages:
- deploy to test
- test
- deploy to prod
Terraform Deploy To Test:
stage: deploy to test
s
我已经为我的存储库设置了Gitlab管道。我在部署时出错了。下面是我的部署脚本。
剧本:
# cd to where csproj is
- cd $deploy_path
# publish the files - this will generate the publish files in bin/release
- dotnet publish -c release
# install zip and lftp
- apt-get update -qq && apt-get install -y -qq zip lftp
# cd to bin
- cd bin
#
我在gitlab主持我的项目。我有CI/CD,计划每24小时运行一次特定的python脚本。该脚本生成一个csv文件,该文件存储在工件中。我需要访问项目的其他python文件中的csv文件,然后将csv解析为dataframes等等。我设法在管道中运行python脚本并生成工件,但是我不知道如何将它访问到另一个python脚本中。
我是否可以在脚本中使用工件作为参数,或者如何最好地处理这个问题?这是我的.gitlab-ci.yml文件:
stages: # List of stages for jobs, and their order of execution
- bu