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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +15 -0
- data/lib/concourse.rb +17 -1
- data/lib/concourse/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 341e502e91b0fadae6f16648c23bdbb6bea3490c
|
4
|
+
data.tar.gz: 0bd52231559a7c306b0fde045f4334f325774e48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4795bf25a52fc6ac22ae6e91288b31e9b26e537fc923dd0f1a8e42c9bd140ead4b457be1bbb25a35d6ac640c0a3f4d261db7d0778e8972e830d9e9c21b370ce1
|
7
|
+
data.tar.gz: f581dfd3edbcee930ff49a7e08dc1eba6af8cba419fe3b312e755bde369818c7dd0c319ebb3005bd416e9ca7c5c7801de4d6554ce2dab1f119b43aa7684a7919
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
data/lib/concourse.rb
CHANGED
@@ -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
|
#
|
data/lib/concourse/version.rb
CHANGED