在 Google Cloud Build 提供商的参数中使用 bash 变量

Using bash variables in arguments in Google Cloud Build provider

这是我在云构建触发器中的步骤之一。

step {
      name = "gcr.io/cloud-builders/docker"       
entrypoint = "bash"
      args = ["-c", "docker", "build", "-t", "gcr.io/something:$(date +%m.%d)", "."]          
    }

它应用得当,但是当我尝试 运行 触发器时,它抱怨标签名称错误。 failed to find one or more images after execution of build steps:

参数不应分开。 它应该看起来像:

step {
      name = "gcr.io/cloud-builders/docker"       
entrypoint = "bash"
      args = ["-c", "docker build -t gcr.io/something:$(date +%m.%d)} ."]         
    }