Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Allow for arbitrary tags when specifying "agent"
Browse files Browse the repository at this point in the history
  • Loading branch information
uniquefine committed Mar 21, 2022
1 parent 40e837e commit 6421eda
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ type Step struct {
}

// Agent is Buildkite agent definition
type Agent struct {
Queue string `yaml:"queue,omitempty"`
}
type Agent map[string]string

// Build is buildkite build definition
type Build struct {
Expand Down
2 changes: 2 additions & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ configuration:
properties:
queue:
type: string
additionalProperties:
type: string
artifacts:
type: array
env:
Expand Down
5 changes: 3 additions & 2 deletions plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ func TestPluginShouldUnmarshallCorrectly(t *testing.T) {
},
"async": true,
"agents": {
"queue": "queue-1"
"queue": "queue-1",
"database": "postgres"
},
"artifacts": [ "artifiact-1" ]
}
Expand Down Expand Up @@ -170,7 +171,7 @@ func TestPluginShouldUnmarshallCorrectly(t *testing.T) {
},
},
Async: true,
Agents: Agent{Queue: "queue-1"},
Agents: map[string]string{"queue": "queue-1", "database": "postgres"},
Artifacts: []string{"artifiact-1"},
},
},
Expand Down

0 comments on commit 6421eda

Please sign in to comment.