buildkit 1.4.6 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03b8e45ebac5e4d266640db473fa71aba8cb6c9a819b5e760c6e728053294463
4
- data.tar.gz: 5f37ba01f369f0e679ed389f7d1cdf6c79151a01d4c74f2a23b51d46a864963b
3
+ metadata.gz: c8339dc16de1e244cb46b37924cd05249fa82bca44697d99df391081949c60dc
4
+ data.tar.gz: ef4616aa820bc0a1b54b76a95b368472c4aee761bfc8bf5f30d625a07928827b
5
5
  SHA512:
6
- metadata.gz: 8225bf1b1508e2ac4d995f6c7e321c5495022441befe47934d3530f88d358073eb25a9779a850d22af0875f327d18fd06e4ffaf8f3c954f3ef14951023a11356
7
- data.tar.gz: 6d4f3ab03f90c4f1314288454f377aaaea7bdb119ae6be91b1f20ed79679a0e10f152f9ce51a8e68f6988dec2f917b34ef1cd0a41dfddcabcd4cd7bcce68cfe4
6
+ metadata.gz: bddd63cad980a59feda2502fb22af7773f651f13e5f897ed6bb60e15f8f90457fbbafae671c3f0bc8588db2431b5b949ddc2d1468c8baf156f198877389e845d
7
+ data.tar.gz: '0028f6cb9fed067344e067d36d835c8fdae534d37799e28f04ef3d05a1a9b740b1fe814b20adbb63507fd02931e864247f7db317f1055b094c2c409ce1449dce'
@@ -65,6 +65,32 @@ module Buildkit
65
65
  def update_pipeline(org, pipeline, options = {})
66
66
  patch("/v2/organizations/#{org}/pipelines/#{pipeline}", options)
67
67
  end
68
+
69
+ # Archive a pipeline
70
+ #
71
+ # @param org [String] Organization slug.
72
+ # @param pipeline [String] pipeline slug.
73
+ # @return [Sawyer::Resource] Hash representing Buildkite pipeline
74
+ # @see https://buildkite.com/docs/api/pipelines#archive-a-pipeline
75
+ # @example
76
+ # Buildkit.archive_pipeline('my-great-org', 'great-pipeline')
77
+ #
78
+ def archive_pipeline(org, pipeline)
79
+ post("/v2/organizations/#{org}/pipelines/#{pipeline}/archive")
80
+ end
81
+
82
+ # Unarchive a pipeline
83
+ #
84
+ # @param org [String] Organization slug.
85
+ # @param pipeline [String] pipeline slug.
86
+ # @return [Sawyer::Resource] Hash representing Buildkite pipeline
87
+ # @see https://buildkite.com/docs/api/pipelines#unarchive-a-pipeline
88
+ # @example
89
+ # Buildkit.unarchive_pipeline('my-great-org', 'great-pipeline')
90
+ #
91
+ def unarchive_pipeline(org, pipeline)
92
+ post("/v2/organizations/#{org}/pipelines/#{pipeline}/unarchive")
93
+ end
68
94
  end
69
95
  end
70
96
  end
@@ -8,7 +8,7 @@ module Buildkit
8
8
  module Response
9
9
  # This class raises an Buildkit-flavored exception based
10
10
  # HTTP status codes returned by the API
11
- class RaiseError < Faraday::Response::Middleware
11
+ class RaiseError < Faraday::Middleware
12
12
  def on_complete(response)
13
13
  if error = Buildkit::Error.from_response(response)
14
14
  raise error
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Buildkit
4
- VERSION = '1.4.6'
4
+ VERSION = '1.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-21 00:00:00.000000000 Z
11
+ date: 2022-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sawyer