That’s a tricky one! There can be a few causes. Let’s see if we can narrow it down!
First up, when you have plugins that depend on ordering, it’s a good idea to use a list for plugins vs a map. It’s rare, but there can be ordering issues with maps as yaml doesn’t guarantee enumeration order. Beyond that, the other possibility is that the ECR login is happening in a region other than us-west-2, which would explain the issue. Do you know what region your agent instance is in?
Turns out it was the region that was the issue. However, the - before the plugins seems to have broken it, throwing:Error: Failed to parse plugin definition: Configuration for "github.com/buildkite-plugins/login-buildkite-plugin" is not a hash
That’s odd, I wonder if perhaps the indenting didn’t come through correctly? The dashes are very important for ordering, otherwise you might login after your docker command!
Is this a problem with the version of buildkite we’re using? We’re using v3.7.0. Wonder if you have any ideas why I can’t use a list ( - before docker and ecr lines) without it failing. Thanks!
Odd, I still can’t get the plugins in a yaml list to work. I originally thought it might be that I’ve got - command: and no label. But adding a `- label: “test” and then command on the next line doesn’t change it.
I’m going to keep playing around with this… One thing I notice is that “plugins” is not an array like yours is. That could be the reason I’m not getting a mix up of the plugin order.