diff --git a/generator/renderer_pipelinetemplate.go b/generator/renderer_pipelinetemplate.go index dc41274..309494e 100644 --- a/generator/renderer_pipelinetemplate.go +++ b/generator/renderer_pipelinetemplate.go @@ -35,7 +35,7 @@ data "gocd_job_definition" "{{.Name}}" { {{end}}] {{- end}}{{if .Resources -}} resources = [{{.Resources | stringJoin -}}]{{end -}}{{if .ElasticProfileId}} - elastic_profile_id = "{{ .ElasticProfileId }}"{{end}}{{if .Tabs}} + elastic_profile_id = "{{ .ElasticProfileID }}"{{end}}{{if .Tabs}} tabs = [{{range .Tabs}} { name = "{{.Name}}", diff --git a/glide.lock b/glide.lock index 2ccc13b..31448e3 100644 --- a/glide.lock +++ b/glide.lock @@ -1,8 +1,8 @@ hash: cda3b9b76a4963ea17a6d17f863e6f676e835d87294901747236f3564f67e07f -updated: 2017-09-10T15:56:19.188825824+01:00 +updated: 2017-09-10T16:42:57.859333381+01:00 imports: - name: github.com/drewsonne/go-gocd - version: 6397adf62bdfdaf564307b209c1a4326bbc33609 + version: a630baf7f541a54c7e57ef31c298102db46524e5 subpackages: - gocd - name: github.com/pkg/errors diff --git a/vendor/github.com/drewsonne/go-gocd/glide.yaml b/vendor/github.com/drewsonne/go-gocd/glide.yaml index 4fd769d..78914d3 100644 --- a/vendor/github.com/drewsonne/go-gocd/glide.yaml +++ b/vendor/github.com/drewsonne/go-gocd/glide.yaml @@ -7,7 +7,7 @@ import: version: 1.20.0 - package: gopkg.in/yaml.v2 testImport: -- package: github.com/stretchr/testify - version: ^1.1.4 +- package: github.com/goreleaser/goreleaser + version: ^0.30.0 subpackages: - assert diff --git a/vendor/github.com/drewsonne/go-gocd/gocd/jobs.go b/vendor/github.com/drewsonne/go-gocd/gocd/jobs.go index 8e475c7..36e7f75 100644 --- a/vendor/github.com/drewsonne/go-gocd/gocd/jobs.go +++ b/vendor/github.com/drewsonne/go-gocd/gocd/jobs.go @@ -35,8 +35,22 @@ type Job struct { Properties []*JobProperty `json:"properties,omitempty"` Resources []string `json:"resources,omitempty"` Tasks []*Task `json:"tasks,omitempty"` - Tabs []string `json:"tabs,omitempty"` - Artifacts []string `json:"artifacts,omitempty"` + Tabs []*Tab `json:"tabs,omitempty"` + Artifacts []*Artifact `json:"artifacts,omitempty"` + ElasticProfileID string `json:"elastic_profile_id,omitempty"` +} + +// Artifact describes the result of a job +type Artifact struct { + Type string `json:"type"` + Source string `json:"source"` + Destination string `json:"destination"` +} + +// Tab description in a gocd job +type Tab struct { + Name string `json:"name"` + Path string `json:"path"` } // JobProperty describes the property for a job diff --git a/vendor/github.com/drewsonne/go-gocd/gocd/pipeline.go b/vendor/github.com/drewsonne/go-gocd/gocd/pipeline.go index 01c10b5..dc8cbe3 100644 --- a/vendor/github.com/drewsonne/go-gocd/gocd/pipeline.go +++ b/vendor/github.com/drewsonne/go-gocd/gocd/pipeline.go @@ -24,7 +24,7 @@ type Pipeline struct { EnablePipelineLocking bool `json:"enable_pipeline_locking,omitempty"` Template string `json:"template,omitempty"` Origin *PipelineConfigOrigin `json:"origin,omitempty"` - Parameters []string `json:"parameters"` + Parameters []*Parameter `json:"parameters"` EnvironmentVariables []*EnvironmentVariable `json:"environment_variables"` Materials []Material `json:"materials,omitempty"` Label string `json:"label,omitempty"` @@ -34,6 +34,12 @@ type Pipeline struct { //Timer string `json:"timer"` } +// Parameter represents a key/value +type Parameter struct { + Name string `json:"name"` + Value string `json:"value"` +} + // PipelineConfigOrigin describes where a pipeline config is being loaded from type PipelineConfigOrigin struct { Type string `json:"type"` @@ -67,6 +73,8 @@ type MaterialAttributes struct { Branch string `json:"branch,omitempty"` SubmoduleFolder string `json:"submodule_folder,omitempty"` ShallowClone bool `json:"shallow_clone,omitempty"` + Pipeline string `json:"pipeline,omitempty"` + Stage string `json:"stage"` } // MaterialFilter describes which globs to ignore