Gitlab云信息集成管道

Gitlab云信息集成管道,gitlab,gitlab-ci,Gitlab,Gitlab Ci,说明:正在尝试创建一个简单管道,以便在aws帐户中创建cloudformation堆栈。 看起来在下面的文档中找不到引用的脚本,但我认为cloudformation cli命令现在在gitlab 13.9中得到了支持 Gitlab版本:13.9 CI/CD变量设置: 请参见此处的必填项。 gitlab yaml文件 变量: 地区:美国东部-2 CI_AWS_CF_堆栈_名称:'gitlabTestStack' CI_AWS_CF_创建_堆栈_文件:“AWS/AWS test STACK.yam

说明:正在尝试创建一个简单管道,以便在aws帐户中创建cloudformation堆栈。 看起来在下面的文档中找不到引用的脚本,但我认为cloudformation cli命令现在在gitlab 13.9中得到了支持

Gitlab版本:13.9

CI/CD变量设置: 请参见此处的必填项。

gitlab yaml文件
变量: 地区:美国东部-2 CI_AWS_CF_堆栈_名称:'gitlabTestStack' CI_AWS_CF_创建_堆栈_文件:“AWS/AWS test STACK.yaml”

deploy:
  stage: deploy
  image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest  
  script:
    - gl-cloudprovision create-stack
输出

    on PDOCK009-Runner-TestAutomation6 UrKKxyCW
Preparing the "docker" executor
Using Docker executor with image registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest ...
Pulling docker image registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest ...
Using docker image sha256:a39347bds862894f38dabf38f1fddfa0avbc1dc3070ca12400fd0a8d33e7178 for registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest ...
Preparing environment
Running on runner-urkkxycw-project-1427-concurrent-0 via 9cdf65ce059d...
Getting source from Git repository
00:01
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/jackoneill/aws-deploy/.git/
Created fresh repository.
From <URL>
 * [new ref]         fbf7a9b966f0be1e2db8fbf7a983c02c90ed8saxc2323x -> refs/pipelines/65421
 * [new branch]      master     -> origin/master
Checking out fbf7a9 master...
Skipping Git submodules setup
Restoring cache
Downloading artifacts
00:02
Running before_script and script
00:02
$ gl-cloudprovision create-stack
/usr/bin/bash: line 103: gl-cloudprovision: command not found
Running after_script
Uploading artifacts for failed job
00:02
ERROR: Job failed: exit code 1
PDOCK009-Runner-TestAutomation6 UrKKxyCW上的

准备“docker”执行器
将Docker executor与image registry.gitlab.com/gitlab org/cloud deploy/aws base一起使用:最新。。。
正在拉docker image registry.gitlab.com/gitlab org/cloud deploy/aws base:latest。。。
将docker映像sha256:a39347bds862894f38dabf38f1fddfa0avbc1dc3070ca12400fd0a8d33e7178用于registry.gitlab.com/gitlab org/cloud deploy/aws base:latest。。。
准备环境
通过9cdf65ce059d在runner-URKKKXYCW-project-1427-concurrent-0上运行。。。
从Git存储库获取源代码
00:01
正在获取git深度设置为50的更改。。。
已在/builds/jackoneill/aws deploy/.Git中初始化空Git存储库/
创建了新的存储库。
从…起
*[新参考]fbf7a9b966f0be1e2db8fbf7a983c02c90ed8saxc2323x->参考/管道/65421
*[新分支机构]主控->原点/主控
正在签出fbf7a9主机。。。
正在跳过Git子模块安装程序
恢复缓存
下载工件
00:02
在脚本和脚本之前运行
00:02
$gl cloudprovision创建堆栈
/usr/bin/bash:第103行:gl cloudprovision:未找到命令
在脚本之后运行
上载失败作业的工件
00:02
错误:作业失败:退出代码1

看起来您需要将图像更改为

image: 'registry.gitlab.com/gitlab-org/cloud-deploy/aws-cloudformation:latest'
和脚本来自

- gl-cloudprovision create-stack

- gl-cloudformation create-stack