concourse-objects 1.15.2 → 1.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ad7abc71d5a356f6122e092a350ccfedc8eac2065d17a45c29d216f091a34c3
4
- data.tar.gz: dbd4aba4fa7e4e415e48016e8355dcbc0b92c15e60aec1e0fceddb282ed48113
3
+ metadata.gz: 7121ecb8e334f181af68f7b40ec75d172a6b4ee388c3b45c0e5b36ae31fc072b
4
+ data.tar.gz: 43e83284c3176dc55382428033cc245dc739534922c80eb84af2223daf777688
5
5
  SHA512:
6
- metadata.gz: 886b36824aa04cb770c9b25658d6fe97071df77a0bd2c19fbb3e6bd005725eabd69a4587974ceec298f52b4d03f0f767b30cf206e28f6b8b3b9158a26f512203
7
- data.tar.gz: 32eb143574249b216858b3826b98fd19056587b154b3c21bd64f79213af4c35fef3b40ace2bbfe3904d653f304c3eed94aed845461ce95875748f60047340c15
6
+ metadata.gz: 6cf121abb034bf8d710c4c49d4064a43585925616063ccf0113b2a5821a5f868da767a8305491498ae7cec78837856b6ffa3b75461268e09d5e9a2a463085b5f
7
+ data.tar.gz: 13283ba6f5d8e68df1c28c5faa2a469c78c18e9c73108281a950e1435949d1da253ba3d864769e984bf07b4c3cbdced6196e7d2c09758f9c9fa717b3c93147fb
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -10,8 +10,26 @@ require_relative "resources/hg"
10
10
  require_relative "resources/pool"
11
11
  require_relative "resources/registry-image"
12
12
  require_relative "resources/s3"
13
+ require_relative "resources/semver"
13
14
  require_relative "resources/time"
14
15
 
16
+ require_relative "resources/concourse-pipeline"
17
+ require_relative "resources/email"
18
+ require_relative "resources/github-list-repos"
19
+ require_relative "resources/github-pr"
20
+ require_relative "resources/github-webhook"
21
+ require_relative "resources/grafana"
22
+ require_relative "resources/helm"
23
+ require_relative "resources/helm-chart"
24
+ require_relative "resources/hipchat-notification"
25
+ require_relative "resources/irc-notification"
26
+ require_relative "resources/keyval"
27
+ require_relative "resources/metadata"
28
+ require_relative "resources/mock"
29
+ require_relative "resources/rss"
30
+ require_relative "resources/rubygems"
31
+ require_relative "resources/slack-notification"
32
+
15
33
  module ConcourseObjects
16
34
  module Resources
17
35
  def self.resources
@@ -47,7 +65,9 @@ module ConcourseObjects
47
65
  def self.owners
48
66
  resources.group_by do |resource|
49
67
  resource.const_get(:GITHUB_OWNER) if resource.const_defined?(:GITHUB_OWNER)
50
- end
68
+ end.sort_by do |key, value|
69
+ value.count
70
+ end.reverse.to_h
51
71
  end
52
72
 
53
73
  def self.owned_by(owner)
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class ConcoursePipeline < Resource
8
+ RESOURCE_NAME = "concourse-pipeline"
9
+ GITHUB_OWNER = "concourse"
10
+ GITHUB_REPOSITORY = "concourse/concourse-pipeline-resource"
11
+ GITHUB_VERSION = "v2.2.0"
12
+
13
+ class Source < Object
14
+ class Team < Object
15
+ required :name, write: AsString
16
+
17
+ optional :username, write: AsString
18
+ optional :password, write: AsString
19
+ end
20
+
21
+ DEFAULT_TARGET = ENV.fetch("ATC_EXTERNAL_URL") { nil }
22
+ DEFAULT_INSECURE = false
23
+
24
+ required :teams, write: AsArrayOf.(Team)
25
+
26
+ optional :target, write: AsString, default: proc { DEFAULT_TARGET }
27
+ optional :insecure, write: AsBoolean, default: proc { DEFAULT_INSECURE }
28
+ end
29
+
30
+ class OutParams < Object
31
+ class Pipeline < Object
32
+ DEFAULT_UNPAUSED = false
33
+ DEFAULT_EXPOSED = false
34
+
35
+ required :name, write: AsString
36
+ required :team, write: AsString
37
+ required :config_file, write: AsString
38
+
39
+ optional :vars_files, write: AsArrayOf.(:to_s)
40
+ optional :vars, write: AsHashOf.(:to_s, :to_s)
41
+ optional :unpaused, write: AsBoolean, default: proc { DEFAULT_UNPAUSED }
42
+ optional :exposed, write: AsBoolean, default: proc { DEFAULT_EXPOSED }
43
+ end
44
+
45
+ optional :pipelines, write: AsArrayOf.(Pipeline)
46
+ optional :pipelines_file, write: AsString
47
+
48
+ def initialize(options = {})
49
+ super(options) do |this, options|
50
+ raise KeyError, "#{self.class.inspect} requires one of (pipelines, pipelines_file)." unless (this.pipelines? or this.pipelines_file?)
51
+
52
+ yield this, options if block_given?
53
+ end
54
+ end
55
+ end
56
+
57
+ optional :source, write: Source
58
+
59
+ def initialize(options = {})
60
+ super(options.merge(type: "concourse-pipeline"))
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class Email < Resource
8
+ RESOURCE_NAME = "email"
9
+ GITHUB_OWNER = "pivotal-cf"
10
+ GITHUB_REPOSITORY = "pivotal-cf/email-resource"
11
+ GITHUB_VERSION = "v1.0.17"
12
+
13
+ class Source < Object
14
+ class SMTP < Object
15
+ DEFAULT_ANONYMOUS = false
16
+ DEFAULT_SKIP_SSL_VALIDATION = false
17
+ DEFAULT_HOST_ORIGIN = "localhost"
18
+
19
+ required :host, write: AsString
20
+ required :port, write: AsString
21
+
22
+ optional :username, write: AsString
23
+ optional :password, write: AsString
24
+ optional :ca_cert, write: AsString
25
+ optional :anonymous, write: AsBoolean, default: proc { DEFAULT_ANONYMOUS }
26
+ optional :skip_ssl_validation, write: AsBoolean, default: proc { DEFAULT_SKIP_SSL_VALIDATION }
27
+ optional :login_auth, write: AsBoolean, default: proc { DEFAULT_LOGIN_AUTH }
28
+ optional :host_origin, write: AsString, default: proc { DEFAULT_HOST_ORIGIN }
29
+
30
+ def initialize(options = {})
31
+ super(options) do |this, options|
32
+ raise KeyError, "#{self.class.inspect} requires (username, password) unless (anonymous) is true" unless this.anonymous
33
+
34
+ yield this, options if block_given?
35
+ end
36
+ end
37
+ end
38
+
39
+ required :from, write: AsString
40
+
41
+ required :to, write: AsArrayOf.(:to_s), default: EmptyArray
42
+ optional :cc, write: AsArrayOf.(:to_s), default: EmptyArray
43
+ optional :bcc, write: AsArrayOf.(:to_s), default: EmptyArray
44
+ end
45
+
46
+ class OutParams < Object
47
+ DEFAULT_SEND_EMPTY_BODY = false
48
+ DEFAULT_DEBUG = false
49
+
50
+ optional :headers, write: AsString
51
+ optional :subject, write: AsString
52
+ optional :subject_text, write: AsString
53
+ optional :body, write: AsString
54
+ optional :body_text, write: AsString
55
+ optional :to, write: AsString
56
+ optional :cc, write: AsString
57
+ optional :bcc, write: AsString
58
+ optional :attachment_globs, write: AsArrayOf.(:to_s)
59
+ optional :send_empty_body, write: AsBoolean, default: proc { DEFAULT_SEND_EMPTY_BODY }
60
+ optional :debug, write: AsBoolean, default: proc { DEFAULT_DEBUG }
61
+
62
+ def initialize(pptions = {})
63
+ super(options) do |this, options|
64
+ raise KeyError, "#{self.class.inspect} requires one of (subject, subject_text)" unless (this.subject? or this.subject_text?)
65
+ raise KeyError, "#{self.class.inspect} requires on of (body, body_text)" unless (this.body? or this.body_text?)
66
+
67
+ yield this, options if block_given?
68
+ end
69
+ end
70
+ end
71
+
72
+ optional :source, write: Source
73
+
74
+ def initialize(options = {})
75
+ super(options.merge(type: "email"))
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class GitHubListRepos < Resource
8
+ RESOURCE_NAME = "github-list-repos"
9
+ GITHUB_OWNER = "coralogix"
10
+ GITHUB_REPOSITORY = "coralogix/eng-concourse-github-list-repos-resource"
11
+ GITHUB_VERSION = "v0.3.1"
12
+
13
+ class Source < Object
14
+ required :"auth-token", write: AsString
15
+ required :org, write: AsString
16
+
17
+ optional :team, write: AsString
18
+ optional :include_regex, write: AsString
19
+ optional :exclude_regex, write: AsString
20
+ optional :exclude, write: AsArrayOf.(:to_s), default: EmptyArray
21
+ end
22
+
23
+ class InParams < Object
24
+ DEFAULT_OUTPUT_FORMAT = "txt"
25
+ ACCEPTABLE_OUTPUT_FORMATS = ["txt", "json"]
26
+ OutputFormatIsAcceptable = proc { |_, output_format| ACCEPTABLE_OUTPUT_FORMATS.include?(output_format) }
27
+
28
+ optional :output_format, write: AsString, default: proc { DEFAULT_OUTPUT_FORMAT }, guard: OutputFormatIsAcceptable
29
+ end
30
+
31
+ optional :source, write: Source
32
+
33
+ def initialize(options = {})
34
+ super(options.merge(type: "github-list-repos"))
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class GitHubPR < Resource
8
+ RESOURCE_NAME = "github-pr"
9
+ GITHUB_OWNER = "telia-oss"
10
+ GITHUB_REPOSITORY = "telia-oss/github-pr-resource"
11
+ GITHUB_VERSION = "v0.18.0"
12
+
13
+ class Source < Object
14
+ required :repository, write: AsString
15
+ required :access_token, write: AsString
16
+
17
+ optional :v3_endpoint, write: AsString
18
+ optional :v4_endpoint, write: AsString
19
+ optional :paths, write: AsArrayOf.(:to_s)
20
+ optional :ignore_paths, write: AsArrayOf.(:to_s)
21
+ optional :disable_ci_skip, write: AsBoolean
22
+ optional :skip_ssl_verification, write: AsBoolean
23
+ optional :disable_forks, write: AsBoolean
24
+ optional :required_review_approvals, write: AsInteger
25
+ optional :git_crypt_key, write: AsString
26
+ optional :base_branch, write: AsString
27
+ optional :labels, write: AsArrayOf.(:to_s)
28
+ end
29
+
30
+ class InParams < Object
31
+ DEFAULT_INTEGRATION_TOOL = "merge"
32
+ ACCEPTABLE_INTEGRATION_TOOLS = ["merge", "rebase", "checkout"]
33
+ IntegrationToolIsAcceptable = proc { |_, integration_tool| ACCEPTABLE_INTEGRATION_TOOLS.include?(integration_tool) }
34
+
35
+ optional :skip_download, write: AsBoolean
36
+ optional :list_changed_files, write: AsBoolean
37
+ optional :git_depth, write: AsInteger
38
+ optional :integration_tool, write: AsString, default: proc { DEFAULT_INTEGRATION_TOOL }, guard: IntegrationToolIsAcceptable
39
+ end
40
+
41
+ class OutParams < Object
42
+ DEFAULT_BASE_CONTEXT = "concourse-ci"
43
+ DEFAULT_CONTEXT = "status"
44
+ ACCEPTABLE_STATUSES = ["SUCCESS", "PENDING", "FAILURE", "ERROR"]
45
+ StatusIsAcceptable = proc { |_, status| ACCEPTABLE_STATUSES.include?(status) }
46
+
47
+ required :path, write: AsString
48
+
49
+ optional :status, write: AsString, guard: StatusIsAcceptable
50
+ optional :base_context, write: AsString, default: proc { DEFAULT_BASE_CONTEXT }
51
+ optional :context, write: AsString, default: proc { DEFAULT_CONTEXT }
52
+ optional :comment, write: AsString
53
+ optional :comment_file, write: AsString
54
+ optional :description, write: AsString
55
+ optional :target_url, write: AsString
56
+ end
57
+
58
+ optional :source, write: Source
59
+
60
+ def initialize(options = {})
61
+ super(options.merge(type: "github-pr"))
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class GitHubWebhook < Resource
8
+ RESOURCE_NAME = "github-webhook"
9
+ GITHUB_OWNER = "homedepot"
10
+ GITHUB_REPOSITORY = "homedepot/github-webhook-resource"
11
+ GITHUB_VERSION = "v1.1.1"
12
+
13
+ class Source < Object
14
+ required :github_api, write: AsString
15
+ required :github_token, write: AsString
16
+ end
17
+
18
+ class OutParams < Object
19
+ DEFAULT_EVENTS = ["push"].freeze
20
+ ACCEPTABLE_OPERATIONS = ["create", "delete"].freeze
21
+ OperationIsAcceptable = proc { |_, operation| ACCEPTABLE_OPERATIONS.include?(operation) }
22
+
23
+ required :org, write: AsString
24
+ required :repo, write: AsString
25
+ required :resource_name, write: AsString
26
+ required :webhook_token, write: AsString
27
+ required :operation, write: AsString, guard: OperationIsAcceptable
28
+
29
+ optional :events, write: AsArrayOf.(:to_s), default: proc { DEFAULT_EVENTS }
30
+ end
31
+
32
+ optional :source, write: Source
33
+
34
+ def initialize(options = {})
35
+ super(options.merge(type: "github-webhook"))
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class Grafana < Resource
8
+ RESOURCE_NAME = "grafana"
9
+ GITHUB_OWNER = "telia-oss"
10
+ GITHUB_REPOSITORY = "telia-oss/grafana-resource"
11
+ GITHUB_VERSION = "v0.0.2"
12
+
13
+ class Source < Object
14
+ required :grafana_url, write: AsString
15
+ required :grafana_token, write: AsString
16
+ end
17
+
18
+ class OutParams < Object
19
+ required :dashboard_id, write: AsString
20
+ required :panels, write: AsString
21
+ end
22
+
23
+ optional :source, write: Source
24
+
25
+ def initialize(options = {})
26
+ super(options.merge(type: "grafana"))
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class HelmChart < Resource
8
+ RESOURCE_NAME = "helm-chart"
9
+ GITHUB_OWNER = "linkyard"
10
+ GITHUB_REPOSITORY = "linkyard/helm-chart-resource"
11
+ GITHUB_VERSION = "v0.1.0"
12
+
13
+ class Source < Object
14
+ class Repo < Object
15
+ required :name, write: AsString
16
+ required :url, write: AsString
17
+
18
+ optional :username, write: AsString
19
+ optional :password, write: AsString
20
+ end
21
+
22
+ required :chart, write: AsString
23
+
24
+ optional :repos, write: AsArrayOf.(Repo), default: EmptyArray
25
+ end
26
+
27
+ class InParams < Object
28
+ DEFAULT_UNTAR = false
29
+ DEFAULT_VERIFY = false
30
+
31
+ optional :untardir, write: AsString
32
+ optional :untar, write: AsBoolean, default: proc { DEFAULT_UNTAR }
33
+ optional :verify, write: AsBoolean, default: proc { DEFAULT_VERIFY }
34
+ end
35
+
36
+ optional :source, write: Source
37
+
38
+ def initialize(options = {})
39
+ super(options.merge(type: "helm-chart"))
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,138 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class Helm < Resource
8
+ RESOURCE_NAME = "helm"
9
+ GITHUB_OWNER = "linkyard"
10
+ GITHUB_REPOSITORY = "linkyard/concourse-helm-resource"
11
+ GITHUB_VERSION = "2.14.1-1"
12
+
13
+ class Source < Object
14
+ class Plugin < Object
15
+ required :url, write: AsString
16
+
17
+ optional :version, write: AsString
18
+ end
19
+
20
+ class Repo < Object
21
+ required :name, write: AsString
22
+ required :url, write: AsString
23
+
24
+ optional :username, write: AsString
25
+ optional :password, write: AsString
26
+ end
27
+
28
+ DEFAULT_HELM_INIT_SERVER = false
29
+ DEFAULT_HELM_INIT_WAIT = false
30
+ DEFAULT_HELM_LIBRARY_MAX = 0
31
+ DEFAULT_HELM_SETUP_PURGE_ALL = false
32
+ DEFAULT_KUBECONFIG_NAMESPACE = false
33
+ DEFAULT_KUBECONFIG_TILLER_NAMESPACE = false
34
+ DEFAULT_NAMESPACE = "default"
35
+ DEFAULT_TILLER_NAMESPACE = "kube-system"
36
+ DEFAULT_TILLERLESS = false
37
+ DEFAULT_TLS_ENABLED = false
38
+ DEFAULT_TRACING_ENABLED = false
39
+
40
+ optional :repos, write: AsArrayOf.(Repo)
41
+ optional :plugins, write: AsArrayOf.(Plugin)
42
+ optional :admin_cert, write: AsString
43
+ optional :admin_key, write: AsString
44
+ optional :cluster_ca, write: AsString
45
+ optional :cluster_url, write: AsString
46
+ optional :helm_ca, write: AsString
47
+ optional :helm_cert, write: AsString
48
+ optional :helm_host, write: AsString
49
+ optional :helm_key, write: AsString
50
+ optional :release, write: AsString
51
+ optional :stable_repo, write: AsString
52
+ optional :tiller_cert, write: AsString
53
+ optional :tiller_key, write: AsString
54
+ optional :tiller_service_account, write: AsString
55
+ optional :token, write: AsString
56
+ optional :token_path, write: AsString
57
+ optional :namespace, write: AsString, default: proc { DEFAULT_NAMESPACE }
58
+ optional :tiller_namespace, write: AsString, default: proc { DEFAULT_TILLER_NAMESPACE }
59
+ optional :helm_history_max, write: AsInteger, default: proc { DEFAULT_HELM_LIBRARY_MAX }
60
+ optional :helm_init_server, write: AsBoolean, default: proc { DEFAULT_HELM_INIT_SERVER }
61
+ optional :helm_init_wait, write: AsBoolean, default: proc { DEFAULT_HELM_INIT_WAIT }
62
+ optional :helm_setup_purge_all, write: AsBoolean, default: proc { DEFAULT_HELM_SETUP_PURGE_ALL }
63
+ optional :kubeconfig_namespace, write: AsBoolean, default: proc { DEFAULT_KUBECONFIG_NAMESPACE }
64
+ optional :kubeconfig_tiller_namespace, write: AsBoolean, default: proc { DEFAULT_KUBECONFIG_TILLER_NAMESPACE }
65
+ optional :tillerless, write: AsBoolean, default: proc { DEFAULT_TILLERLESS }
66
+ optional :tls_enabled, write: AsBoolean, default: proc { DEFAULT_TLS_ENABLED }
67
+ optional :tracing_enabled, write: AsBoolean, default: proc { DEFAULT_TRACING_ENABLED }
68
+
69
+ def initialize(options = {})
70
+ super(options) do |this, options|
71
+ raise KeyError, "#{self.class.inspect} requires one of (token, token_path, (admin_key, admin_cert))" unless (this.token? or this.token_path? or (this.admin_key? and this.admin_cert?))
72
+
73
+ unless this.tls_enabled
74
+ this.tiller_cert = nil
75
+ this.tiller_key = nil
76
+ this.helm_ca = nil
77
+ this.helm_cert = nil
78
+ this.helm_key = nil
79
+ end
80
+
81
+ this.tiller_service_account = nil unless this.helm_init_server
82
+
83
+ yield this, options if block_given?
84
+ end
85
+ end
86
+ end
87
+
88
+ class OutParams < Object
89
+ DEFAULT_CHECK_IS_READY = false
90
+ DEFAULT_DEBUG = false
91
+ DEFAULT_DELETE = false
92
+ DEFAULT_DEVEL = false
93
+ DEFAULT_EXIT_AFTER_DIFF = false
94
+ DEFAULT_FORCE = false
95
+ DEFAULT_PURGE = false
96
+ DEFAULT_RECREATE_PODS = false
97
+ DEFAULT_REPLACE = false
98
+ DEFAULT_RESET_VALUES = false
99
+ DEFAULT_REUSE_VALUES = false
100
+ DEFAULT_SHOW_DIFF = false
101
+ DEFAULT_TEST = false
102
+ DEFAULT_WAIT = 0
103
+ DEFAULT_WAIT_UNTIL_READY = false
104
+
105
+ required :chart, write: AsString
106
+
107
+ optional :kubeconfig_path, write: AsString
108
+ optional :namespace, write: AsString
109
+ optional :release, write: AsString
110
+ optional :token_path, write: AsString
111
+ optional :values, write: AsString
112
+ optional :version, write: AsString
113
+ optional :override_values, write: AsArrayOf.(AsHash), default: EmptyArray
114
+ optional :check_is_ready, write: AsBoolean, default: proc { DEFAULT_CHECK_IS_READY }
115
+ optional :debug, write: AsBoolean, default: proc { DEFAULT_DEBUG }
116
+ optional :delete, write: AsBoolean, default: proc { DEFAULT_DELETE }
117
+ optional :devel, write: AsBoolean, default: proc { DEFAULT_DEVEL }
118
+ optional :exit_after_diff, write: AsBoolean, default: proc { DEFAULT_EXIT_AFTER_DIFF }
119
+ optional :force, write: AsBoolean, default: proc { DEFAULT_FORCE }
120
+ optional :purge, write: AsBoolean, default: proc { DEFAULT_PURGE }
121
+ optional :recreate_pods, write: AsBoolean, default: proc { DEFAULT_RECREATE_PODS }
122
+ optional :replace, write: AsBoolean, default: proc { DEFAULT_REPLACE }
123
+ optional :reset_values, write: AsBoolean, default: proc { DEFAULT_RESET_VALUES }
124
+ optional :reuse_values, write: AsBoolean, default: proc { DEFAULT_REUSE_VALUES }
125
+ optional :show_diff, write: AsBoolean, default: proc { DEFAULT_SHOW_DIFF }
126
+ optional :test, write: AsBoolean, default: proc { DEFAULT_TEST }
127
+ optional :wait, write: AsInteger, default: proc { DEFAULT_WAIT }
128
+ optional :wait_until_ready, write: AsInteger, default: proc { DEFAULT_WAIT_UNTIL_READY }
129
+ end
130
+
131
+ optional :source, write: Source
132
+
133
+ def initialize(options = {})
134
+ super(options.merge(type: "helm"))
135
+ end
136
+ end
137
+ end
138
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class HipChatNotification < Resource
8
+ RESOURCE_NAME = "hipchat-notification"
9
+ GITHUB_OWNER = "cloudfoundry-community"
10
+ GITHUB_REPOSITORY = "cloudfoundry-community/hipchat-notification-resource"
11
+ GITHUB_VERSION = "v0.0.4"
12
+
13
+ class Source < Object
14
+ required :hipchat_server_url, write: AsString
15
+ required :token, write: AsString
16
+
17
+ optional :room_id, write: AsString
18
+ end
19
+
20
+ class OutParams < Object
21
+ class Message < Object
22
+ required :template, write: AsString
23
+ required :params, write: AsHashOf.(:to_s, :to_s)
24
+
25
+ def self.call(object)
26
+ case object
27
+ when String then new(template: object, params: {})
28
+ else super(object)
29
+ end
30
+ end
31
+ end
32
+
33
+ DEFAULT_COLOR = "yellow"
34
+ DEFAULT_FORMAT = "html"
35
+ DEFAULT_NOTIFY = 0
36
+
37
+ ACCEPTABLE_COLORS = ["yellow", "red", "green", "purple", "gray", "random"]
38
+ ACCEPTABLE_FORMATS = ["html", "text"]
39
+
40
+ AsBooleanInteger = proc { |source| (source == 0) ? false : (AsBoolean.(source) ? 1 : 0) }
41
+ ColorIsAcceptable = proc { |_, color| ACCEPTABLE_COLORS.include?(color) }
42
+ FormatIsAcceptable = proc { |_, format| ACCEPTABLE_FORMATS.include?(color) }
43
+
44
+ required :from, write: AsString
45
+ required :message, write: Message
46
+
47
+ optional :color, write: AsString, default: proc { DEFAULT_COLOR }, guard: ColorIsAcceptable
48
+ optional :format, write: AsString, default: proc { DEFAULT_FORMAT }, guard: FormatIsAcceptable
49
+ optional :notify, write: AsBooleanInteger, default: proc { DEFAULT_NOTIFY }
50
+ end
51
+
52
+ optional :source, write: Source
53
+
54
+ def initialize(options = {})
55
+ super(options.merge(type: "hipchat-notification"))
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class IRCNotification < Resource
8
+ RESOURCE_NAME = "irc-notification"
9
+ GITHUB_OWNER = "flavorjones"
10
+ GITHUB_REPOSITORY = "flavorjones/irc-notification-resource"
11
+ GITHUB_VERSION = "v1.2.0"
12
+
13
+ class Source < Object
14
+ DEFAULT_USETLS = true
15
+ DEFAULT_JOIN = false
16
+ DEFAULT_DEBUG = false
17
+
18
+ required :server, write: AsString
19
+ required :port, write: AsInteger
20
+ required :channel, write: AsString
21
+ required :user, write: AsString
22
+ required :password, write: AsString
23
+
24
+ optional :usetls, write: AsBoolean, default: proc { DEFAULT_USETLS }
25
+ optional :join, write: AsBoolean, default: proc { DEFAULT_JOIN }
26
+ optional :debug, write: AsBoolean, default: proc { DEFAULT_DEBUG }
27
+ end
28
+
29
+ class OutParams < Object
30
+ required :message, write: AsString
31
+ end
32
+
33
+ optional :source, write: Source
34
+
35
+ def initialize(options = {})
36
+ super(options.merge(type: "irc-notification"))
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class KeyVal < Resource
8
+ RESOURCE_NAME = "keyval"
9
+ GITHUB_OWNER = "SWCE"
10
+ GITHUB_REPOSITORY = "SWCE/keyval-resource"
11
+ GITHUB_VERSION = "1.0.6"
12
+
13
+ class Source < Object
14
+ end
15
+
16
+ class OutParams < Object
17
+ required :file, write: AsString
18
+ end
19
+
20
+ optional :source, write: Source
21
+
22
+ def initialize(options = {})
23
+ super(options.merge(type: "keyval"))
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class Metadata < Resource
8
+ RESOURCE_NAME = "metadata"
9
+ GITHUB_OWNER = "SWCE"
10
+ GITHUB_REPOSITORY = "SWCE/metadata-resource"
11
+ GITHUB_VERSION = "v0.0.3"
12
+
13
+ class Source < Object
14
+ end
15
+
16
+ optional :source, write: Source
17
+
18
+ def initialize(options = {})
19
+ super(options.merge(type: "metadata"))
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class Mock < Resource
8
+ RESOURCE_NAME = "mock"
9
+ GITHUB_OWNER = "concourse"
10
+ GITHUB_REPOSITORY = "concourse/mock-resource"
11
+ GITHUB_VERSION = "v0.6.1"
12
+
13
+ class Source < Object
14
+ end
15
+
16
+ optional :source, write: Source
17
+
18
+ def initialize(options = {})
19
+ super(options.merge(type: "mock"))
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class RSS < Resource
8
+ RESOURCE_NAME = "rss"
9
+ GITHUB_OWNER = "suhlig"
10
+ GITHUB_REPOSITORY = "suhlig/concourse-rss-resource"
11
+ GITHUB_VERSION = "v1.0"
12
+
13
+ class Source < Object
14
+ required :uri, write: AsString
15
+ end
16
+
17
+ optional :source, write: Source
18
+
19
+ def initialize(options = {})
20
+ super(options.merge(type: "rss"))
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class RubyGems < Resource
8
+ RESOURCE_NAME = "rubygems"
9
+ GITHUB_OWNER = "troykinsella"
10
+ GITHUB_REPOSITORY = "troykinsella/concourse-rubygems-resource"
11
+ GITHUB_VERSION = "1.0.0"
12
+
13
+ class Source < Object
14
+ DEFAULT_PRERELEASE = false
15
+ DEFAULT_SOURCE_URL = "https://rubygems.org"
16
+
17
+ required :gem_name, write: AsString
18
+
19
+ optional :apt_keys, write: AsArrayOf.(:to_s)
20
+ optional :apt_sources, write: AsArrayOf.(:to_s)
21
+ optional :deb_packages, write: AsArrayOf.(:to_s)
22
+ optional :credentials, write: AsString
23
+ optional :source_url, write: AsString, default: proc { DEFAULT_SOURCE_URL }
24
+ end
25
+
26
+ class InParams < Object
27
+ DEFAULT_SKIP_DOWNLOAD = false
28
+
29
+ optional :install_options, write: AsArrayOf.(:to_s)
30
+ optional :skip_download, write: AsBoolean, default: proc { DEFAULT_SKIP_DOWNLOAD }
31
+ end
32
+
33
+ class OutParams < Object
34
+ required :gem_dir, write: AsString
35
+ optional :gem_regex, write: AsString
36
+ optional :key_name, write: AsString
37
+ end
38
+
39
+ optional :source, write: Source
40
+
41
+ def initialize(options = {})
42
+ super(options.merge(type: "mock"))
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../concourse-objects"
4
+
5
+ module ConcourseObjects
6
+ module Resources
7
+ class SlackNotification < Resource
8
+ RESOURCE_NAME = "slack-notification"
9
+ GITHUB_OWNER = "cloudfoundry-community"
10
+ GITHUB_REPOSITORY = "cloudfoundry-community/slack-notification-resource"
11
+ GITHUB_VERSION = "v1.5.0"
12
+
13
+ class Source < Object
14
+ DEFAULT_PROXY_HTTP_TUNNEL = false
15
+ DEFAULT_DISABLE = false
16
+ DEFAULT_INSECURE = false
17
+
18
+ required :url, write: AsString
19
+
20
+ optional :proxy, write: AsString
21
+ optional :ca_certs, write: AsArrayOf.(:to_s), default: EmptyArray
22
+ optional :proxy_https_tunnel, write: AsBoolean, default: proc { DEFAULT_PROXY_HTTP_TUNNEL}
23
+ optional :disable, write: AsBoolean, default: proc { DEFAULT_DISABLE }
24
+ optional :insecure, write: AsBoolean
25
+ end
26
+
27
+ class OutParams < Object
28
+ class Attachment < Object
29
+ class Field < Object
30
+ DEFAULT_SHORT = false
31
+
32
+ optional :title, write: AsString
33
+ optional :value, write: AsString
34
+ optional :short, write: AsBoolean, default: proc { DEFAULT_SHORT }
35
+ end
36
+
37
+ optional :fallback, write: AsString
38
+ optional :color, write: AsString
39
+ optional :pretext, write: AsString
40
+ optional :author_name, write: AsString
41
+ optional :author_link, write: AsString
42
+ optional :author_icon, write: AsString
43
+ optional :title, write: AsString
44
+ optional :title_link, write: AsString
45
+ optional :image_url, write: AsString
46
+ optional :thumb_url, write: AsString
47
+ optional :footer, write: AsString
48
+ optional :footer_icon, write: AsString
49
+ optional :ts, write: AsInteger
50
+ optional :fields, write: AsArrayOf.(Field), default: EmptyArray
51
+ end
52
+
53
+ DEFAULT_SILENT = false
54
+ DEFAULT_ALWAYS_NOTIFY = false
55
+
56
+ optional :text, write: AsString
57
+ optional :text_file, write: AsString
58
+ optional :attachments_file, write: AsString
59
+ optional :attachments, write: AsArrayOf.(Attachment), default: EmptyArray
60
+
61
+ optional :silent, write: AsBoolean, default: proc { DEFAULT_SILENT }
62
+ optional :always_notify, write: AsBoolean, default: proc { DEFAULT_ALWAYS_NOTIFY }
63
+ optional :channel, write: AsString
64
+ optional :channel_file, write: AsString
65
+ optional :env_file, write: AsString
66
+ optional :username, write: AsString
67
+ optional :icon_url, write: AsString
68
+ optional :icon_emoji, write: AsString
69
+
70
+ def initialize(options = {})
71
+ super(options) do |this, options|
72
+ raise KeyError, "#{self.class.inspect} requires one of (text, text_file, attachments, attachments_file)" unless (this.text? or this.text_file? or this.attachments? or this.attachments_file?)
73
+
74
+ yield this, options if block_given?
75
+ end
76
+ end
77
+ end
78
+
79
+ optional :source, write: Source
80
+
81
+ def initialize(options = {})
82
+ super(options.merge(type: "slack-notification"))
83
+ end
84
+ end
85
+ end
86
+ end
@@ -26,7 +26,7 @@ TTY::Table.new(header: ["name", "repository", "expected", "actual"]).yield_self
26
26
  Octokit::Client.new(access_token: ENV["GITHUB_ACCESS_TOKEN"], auto_paginate: true).yield_self do |github|
27
27
  ConcourseObjects::Resources.resources.sort_by { |resource| resource::GITHUB_REPOSITORY }.each do |resource|
28
28
  WhileSpinning.("#{resource::RESOURCE_NAME} (#{resource::GITHUB_REPOSITORY})") do
29
- github.latest_release(resource::GITHUB_REPOSITORY).name.yield_self do |version|
29
+ github.latest_release(resource::GITHUB_REPOSITORY).tag_name.yield_self do |version|
30
30
  results << [resource::RESOURCE_NAME, resource::GITHUB_REPOSITORY, resource::GITHUB_VERSION, version]
31
31
 
32
32
  resource::GITHUB_VERSION == version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concourse-objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.2
4
+ version: 1.32.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Olstrom
@@ -34,7 +34,7 @@ cert_chain:
34
34
  APmVyMIj8BOONTIc1ZAHLsGH0+fQFhCPG9W2o8uyakRimIHxDPHpr7HT3s5+vlIR
35
35
  ++pdkR83HVNOuHEO3yPK2bf7NGJpNbcM
36
36
  -----END CERTIFICATE-----
37
- date: 2019-08-19 00:00:00.000000000 Z
37
+ date: 2019-08-22 00:00:00.000000000 Z
38
38
  dependencies: []
39
39
  description:
40
40
  email: chris@olstrom.com
@@ -52,14 +52,30 @@ files:
52
52
  - lib/concourse-objects/resources/bosh-io-release.rb
53
53
  - lib/concourse-objects/resources/bosh-io-stemcell.rb
54
54
  - lib/concourse-objects/resources/cf.rb
55
+ - lib/concourse-objects/resources/concourse-pipeline.rb
55
56
  - lib/concourse-objects/resources/docker-image.rb
57
+ - lib/concourse-objects/resources/email.rb
56
58
  - lib/concourse-objects/resources/git.rb
59
+ - lib/concourse-objects/resources/github-list-repos.rb
60
+ - lib/concourse-objects/resources/github-pr.rb
57
61
  - lib/concourse-objects/resources/github-release.rb
62
+ - lib/concourse-objects/resources/github-webhook.rb
63
+ - lib/concourse-objects/resources/grafana.rb
64
+ - lib/concourse-objects/resources/helm-chart.rb
65
+ - lib/concourse-objects/resources/helm.rb
58
66
  - lib/concourse-objects/resources/hg.rb
67
+ - lib/concourse-objects/resources/hipchat-notification.rb
68
+ - lib/concourse-objects/resources/irc-notification.rb
69
+ - lib/concourse-objects/resources/keyval.rb
70
+ - lib/concourse-objects/resources/metadata.rb
71
+ - lib/concourse-objects/resources/mock.rb
59
72
  - lib/concourse-objects/resources/pool.rb
60
73
  - lib/concourse-objects/resources/registry-image.rb
74
+ - lib/concourse-objects/resources/rss.rb
75
+ - lib/concourse-objects/resources/rubygems.rb
61
76
  - lib/concourse-objects/resources/s3.rb
62
77
  - lib/concourse-objects/resources/semver.rb
78
+ - lib/concourse-objects/resources/slack-notification.rb
63
79
  - lib/concourse-objects/resources/time.rb
64
80
  - tools/check-resources
65
81
  - tools/test
metadata.gz.sig CHANGED
Binary file