concourse 0.9.0 → 0.10.0

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
  SHA1:
3
- metadata.gz: 8581546c7af4991d5b4f3c2c02bf051e044ef634
4
- data.tar.gz: 731ee5b9feb1097922e85d3617841584c15c0b81
3
+ metadata.gz: 341e502e91b0fadae6f16648c23bdbb6bea3490c
4
+ data.tar.gz: 0bd52231559a7c306b0fde045f4334f325774e48
5
5
  SHA512:
6
- metadata.gz: 4ee6f10e28fa623c06cd68f71e8ce90d61684174a3981d04ba32b6ed76ff1636bdb26e4e2a6738857902c3cdfa8e819c7cf28caa487800f92ec9dfe23cb1ebff
7
- data.tar.gz: 0ec6b0c3ffcdb7592ad27e81e45d02384f0fc2d46f8f55c24d53c85d4e8e396a1de01ea1992738e259eb9f68568c4cf4544b1404d30cc3b7c2a66d9a24dbf89a
6
+ metadata.gz: 4795bf25a52fc6ac22ae6e91288b31e9b26e537fc923dd0f1a8e42c9bd140ead4b457be1bbb25a35d6ac640c0a3f4d261db7d0778e8972e830d9e9c21b370ce1
7
+ data.tar.gz: f581dfd3edbcee930ff49a7e08dc1eba6af8cba419fe3b312e755bde369818c7dd0c319ebb3005bd416e9ca7c5c7801de4d6554ce2dab1f119b43aa7684a7919
@@ -1,5 +1,10 @@
1
1
  # concourse-gem changelog
2
2
 
3
+ ## 0.10.0 / 2017-02-08
4
+
5
+ Add `destroy` and `abort-builds` tasks.
6
+
7
+
3
8
  ## 0.9.0 / 2017-02-08
4
9
 
5
10
  Bugfix: run `fly execute` with a clean Bundler environment, to avoid accidentally injecting our environment variables into the running task.
data/README.md CHANGED
@@ -83,6 +83,14 @@ rake concourse:pause[fly_target] # pause the myproject pipeline
83
83
  rake concourse:unpause[fly_target] # unpause the myproject pipeline
84
84
  ```
85
85
 
86
+ And, should you ever need to [nuke the site from orbit][ripley], a task to destroy your pipeline:
87
+
88
+ ```
89
+ rake concourse:destroy[fly_target] # destroy the myproject pipeline
90
+ ```
91
+
92
+
93
+ [ripley]: https://www.youtube.com/watch?v=aCbfMkh940Q
86
94
 
87
95
  ### Running tasks with `fly execute`
88
96
 
@@ -97,6 +105,13 @@ where:
97
105
  * _optional_: `fly_execute_args` will default to map the project directory to a resource with the project name, e.g. `--input=myproject=.`, so your pipeline must name the input resource appropriately in order to use the default.
98
106
 
99
107
 
108
+ ### Aborting running builds
109
+
110
+ ```
111
+ rake concourse:abort-builds[fly_target] # abort all running builds for this pipeline
112
+ ```
113
+
114
+
100
115
  ### Generating a sweet set of markdown badges
101
116
 
102
117
  Would you like a markdown table of your jobs' passing/failing badges? Of course you would.
@@ -75,7 +75,7 @@ class Concourse
75
75
  sh "fly -t #{fly_target} set-pipeline #{options.join(" ")}"
76
76
  end
77
77
 
78
- %w[expose hide pause unpause].each do |command|
78
+ %w[expose hide pause unpause destroy].each do |command|
79
79
  desc "#{command} the #{project_name} pipeline"
80
80
  task "#{command}", [:fly_target] do |t, args|
81
81
  fly_target = Concourse.validate_fly_target t, args
@@ -126,6 +126,22 @@ class Concourse
126
126
  end
127
127
  end
128
128
 
129
+ #
130
+ # builds commands
131
+ #
132
+ desc "abort all running builds for this pipeline"
133
+ task "abort-builds", [:fly_target] do |t, args|
134
+ fly_target = Concourse.validate_fly_target t, args
135
+
136
+ `fly -t #{fly_target} builds`.split("\n").each do |line|
137
+ pipeline_job, build_id, status = *line.split(/\s+/)[1,3]
138
+ next unless status == "started"
139
+
140
+ sh "fly -t #{fly_target} abort-build -j #{pipeline_job} -b #{build_id}"
141
+ end
142
+ # fly -t flavorjones-oss-concourse builds | fgrep started | awk '{print "-j", $2, "-b", $3}' | xargs -d "\n" -n1 echo fly -t flavorjones-oss-concourse abort-build | bash
143
+ end
144
+
129
145
  #
130
146
  # badge commands
131
147
  #
@@ -2,5 +2,5 @@ require "rake"
2
2
  require "erb"
3
3
 
4
4
  class Concourse
5
- VERSION = "0.9.0"
5
+ VERSION = "0.10.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concourse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Dalessio