【发布时间】:2019-05-02 16:40:11
【问题描述】:
我有以下 config.yml 用于运行良好的 circleci 构建 它使用 aws-ecr 和 aws-ecs 球体。
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@0.0.2
aws-ecs: circleci/aws-ecs@0.0.3
workflows:
build-deploy:
jobs:
- aws-ecr/build_and_push_image:
account-url: "myaccount.amazonaws.com"
repo: "my/repo"
region: us-east-1
tag: "${CIRCLE_BRANCH}"
filters:
branches:
only: mybranch
问题是这个 repo 包含一个 .gitmodules 文件,它引入了一个私有子模块。 我似乎无法弄清楚如何覆盖/扩展球体以额外运行相当于
的circlecigit submodule update --init
我尝试将它添加到 dockerfile,但后来我得到了
Permission denied (publickey).
fatal: Could not read from remote repository.
注意:dockerfile 在本地构建良好,因为本地 docker 会自动注入我的 git 密钥
我也尝试将 orb 作业重新配置为步骤,即
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@0.0.2
aws-ecs: circleci/aws-ecs@0.0.3
workflows:
build-deploy:
jobs:
- lb_build_and_push_image:
steps:
- add_ssh_keys:
fingerprints:
- "my:fin:ger:print"
- aws-ecr/build_and_push_image:
account-url: "account.amazonaws.com"
repo: "my/repo-backend"
region: us-east-1
tag: "${CIRCLE_BRANCH}"
filters:
branches:
only: mybranch
...指纹来自 ssh 结帐密钥中的“用户密钥”。 我尝试了各种作业/步骤配置。
并且架构总是失败并显示以下通常消息:
Error: ERROR IN CONFIG FILE:
[#/workflows/build-deploy/jobs/0] 0 subschemas matched instead of one
1. [#/workflows/build-deploy/jobs/0] expected type: String, found: Mapping
是否有人对如何进行,正确的配置可能是什么,或者只是关于如何在故障排除中前进的一般性指示? 非常感谢任何见解。
【问题讨论】:
-
Cross-posted here。感谢您更新这两个问题
:-)。 -
哎呀,抱歉没有发布交叉发布的链接
标签: git-submodules amazon-ecs circleci