【发布时间】:2020-04-01 15:47:59
【问题描述】:
当我将 cloudbuild.yaml 与 CloudBuild 触发器一起使用时,它会失败并显示:
failed unmarshalling build config cloudbuild.yaml: json: cannot unmarshal string into Go value of type []json.RawMessage
我已经将我的 cloudbuild.yaml 缩减为
steps:
- name: "gcr.io/skynet-2359/sonar-scanner"
waitFor: "-"
args: [
"-Dsonar.projectKey=xxx",
"-Dsonar.sources=./src",
"-Dsonar.host.url=http://sonarqube....",
"-Dsonar.login=${_SONAR_TOKEN}"
]
substitutions:
_SONAR_TOKEN: "..."
如果我使用 CLI 方式启动,则构建工作:
gcloud builds submit --config cloudbuild.yaml .
【问题讨论】:
-
你检查过这个帖子吗?似乎正在讨论一个类似的问题,它没有解释为什么它在本地成功但可能值得检查您的声纳令牌大小:stackoverflow.com/questions/51539273/…
-
@ParthMehta 发现了问题。我的是因为我没有使用数组来等待
标签: google-cloud-platform google-cloud-build