ruby_fly 0.4.0 → 0.4.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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +102 -1
- data/lib/ruby_fly.rb +1 -1
- data/lib/ruby_fly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8ea251b06d2d70cb0127363df0ca4a50bebcadd
|
4
|
+
data.tar.gz: 8e97b3aef74ed646434768292218191134067824
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94d53292baaf092f5efa3c049c8f00d2051f5605086d6885d68c129822b111f0ea323cf36813b72fbab7519beefd0a63aea29b0a5bd6b2a1f4df070e6d053be8
|
7
|
+
data.tar.gz: b8f3c7961612ceafe8e60fcda48df6513898dcd6ba55ebba7a31159595870f5394e94e5ea51b61b2ce82bb3972aa08bf8a39d8a8d8521703019d1b7732a3ce56
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -21,7 +21,108 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
## Usage
|
23
23
|
|
24
|
-
|
24
|
+
### Binary Location
|
25
|
+
|
26
|
+
RubyFly needs to know where the fly binary is located before it can do anything.
|
27
|
+
By default, RubyFly looks on the path however this can be configured with:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
RubyFly.configure do |config|
|
31
|
+
config.binary = 'vendor/fly/bin/fly'
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
In addition, each command takes a `binary` keyword argument at initialisation
|
36
|
+
that overrides the global configuration value.
|
37
|
+
|
38
|
+
### Login
|
39
|
+
|
40
|
+
Currently the library doesn't support logging in to a Concourse instance so if
|
41
|
+
the target instance requires authentication, a session must be manually
|
42
|
+
established before any commands are executed. If there are recommendations for
|
43
|
+
a good approach to automatic login, please raise an issue or a pull request.
|
44
|
+
|
45
|
+
### Commands
|
46
|
+
|
47
|
+
Currently, there is partial support for the following commands:
|
48
|
+
* `RubyFly::Commands::GetPipeline`: fetches the current configuration of a
|
49
|
+
pipeline from a target Concourse (`fly get-pipeline`)
|
50
|
+
* `RubyFly::Commands::SetPipeline`: submits a pipeline configuration to
|
51
|
+
a target Concourse (`fly set-pipeline`)
|
52
|
+
* `RubyFly::Commands::UnpausePipeline`: unpauses a pipeline on a target
|
53
|
+
Concourse (`fly unpause-pipeline`)
|
54
|
+
* `RubyFly::Commands::Version`: returns the version of the fly binary
|
55
|
+
|
56
|
+
#### `RubyFly::Commands::GetPipeline`
|
57
|
+
|
58
|
+
The get-pipeline command can be called in the following ways:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
RubyFly.get_pipeline(
|
62
|
+
target: 'supercorp-ci',
|
63
|
+
pipeline: 'supercorp-service')
|
64
|
+
RubyFly::Commands::GetPipeline.new.execute(
|
65
|
+
target: 'supercorp-ci',
|
66
|
+
pipeline: 'supercorp-service')
|
67
|
+
```
|
68
|
+
|
69
|
+
The get-pipeline command supports the following options passed as keyword
|
70
|
+
arguments (as in the example above):
|
71
|
+
* `target`: the Concourse instance to target
|
72
|
+
* `pipeline`: the pipeline for which to get configuration
|
73
|
+
|
74
|
+
#### `RubyFly::Commands::SetPipeline`
|
75
|
+
|
76
|
+
The set-pipeline command can be called in the following ways:
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
RubyFly.set_pipeline(
|
80
|
+
target: 'supercorp-ci',
|
81
|
+
pipeline: 'supercorp-service',
|
82
|
+
config: 'ci/pipeline.yml')
|
83
|
+
RubyFly::Commands::SetPipeline.new.execute(
|
84
|
+
target: 'supercorp-ci',
|
85
|
+
pipeline: 'supercorp-service',
|
86
|
+
config: 'ci/pipeline.yml')
|
87
|
+
```
|
88
|
+
|
89
|
+
The set-pipeline command supports the following options passed as keyword
|
90
|
+
arguments (as in the example above):
|
91
|
+
* `target`: the Concourse instance to target
|
92
|
+
* `pipeline`: the pipeline for which to set configuration
|
93
|
+
* `config`: the local file containing the pipeline configuration
|
94
|
+
* `vars`: an hash of variables to be accessible as interpolations
|
95
|
+
* `var_files`: an array of paths to files containing variables to be accessible
|
96
|
+
as interpolations
|
97
|
+
* `non_interactive`: if `false`, any missing variables will be prompted for,
|
98
|
+
if `true`, any missing variables will cause the command to fail
|
99
|
+
|
100
|
+
#### `RubyFly::Commands::UnpausePipeline`
|
101
|
+
|
102
|
+
The unpause-pipeline command can be called in the following ways:
|
103
|
+
|
104
|
+
```ruby
|
105
|
+
RubyFly.unpause_pipeline(
|
106
|
+
target: 'supercorp-ci',
|
107
|
+
pipeline: 'supercorp-service')
|
108
|
+
RubyFly::Commands::UnpausePipeline.new.execute(
|
109
|
+
target: 'supercorp-ci',
|
110
|
+
pipeline: 'supercorp-service')
|
111
|
+
```
|
112
|
+
|
113
|
+
The get-pipeline command supports the following options passed as keyword
|
114
|
+
arguments (as in the example above):
|
115
|
+
* `target`: the Concourse instance to target
|
116
|
+
* `pipeline`: the pipeline to unpause
|
117
|
+
|
118
|
+
#### `RubyFly::Commands::Version`
|
119
|
+
|
120
|
+
The version command can be called in the following ways:
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
version = RubyFly.version
|
124
|
+
version = RubyFly::Commands::Version.new.execute
|
125
|
+
```
|
25
126
|
|
26
127
|
## Development
|
27
128
|
|
data/lib/ruby_fly.rb
CHANGED
data/lib/ruby_fly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_fly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lino
|