"Invalid stack, only stack 1 and 5 are supported for builds" 是什么意思?

What does "Invalid stack, only stack 1 and 5 are supported for builds" means?

我试图通过点击 API 端点 mentioned in the documentation 来触发新的 Wercker 构建,但是 API returns 以下响应:

{"statusCode"=>400, "error"=>"Bad Request", "message"=>"Invalid stack, only stack 1 and 5 are supported for builds"}

错误消息 "Invalid stack, only stack 1 and 5 are supported for builds" 是什么意思?

我尝试使用以下脚本发送请求:

$ jq . -c <<JSON | curl -s -d @- -H 'Authorization: Bearer token' -H 'Content-type: application/json' 'https://app.wercker.com/api/v3/builds' | jq .
{
  "applicationId": "applicationid",
  "branch":"develop",
  "envVars":[
    {"key":"HOGE_FOO","value":"true"}
  ]
}
JSON

{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Invalid stack, only stack 1 and 5 are supported for builds"
}

[这里是 Wercker 员工!]

构建端点适用于 Wercker 经典堆栈,它具有不同的构建和部署概念。当前的 Wercker Workflows 堆栈使用 runs API endpoint 来控制任意管道运行。

您看到的错误消息以一种有点神秘的方式告诉您这一点。版本 6 指的是工作流堆栈,1 和 5 是 classic/deprecated 堆栈。我会在我们的文档中更清楚地说明这一点,但是如果您将调用从构建 API 端点替换为运行 API 端点,它应该可以工作!