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 +4 -4
- data/lib/buildkit/client/pipelines.rb +26 -0
- data/lib/buildkit/response/raise_error.rb +1 -1
- data/lib/buildkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8339dc16de1e244cb46b37924cd05249fa82bca44697d99df391081949c60dc
|
4
|
+
data.tar.gz: ef4616aa820bc0a1b54b76a95b368472c4aee761bfc8bf5f30d625a07928827b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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::
|
11
|
+
class RaiseError < Faraday::Middleware
|
12
12
|
def on_complete(response)
|
13
13
|
if error = Buildkit::Error.from_response(response)
|
14
14
|
raise error
|
data/lib/buildkit/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2022-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sawyer
|