rumrunner 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -7
- data/lib/rumrunner/manifest.rb +5 -5
- data/lib/rumrunner/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8595b9e4d67acb2af46be0def2d1b5ed7421e2457020e7c52f8aeb374aa3e417
|
4
|
+
data.tar.gz: a0898e3d08df28f43dafbda1438a6824d5580515ddf023f29c9eebf8d330ffb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27039a4980ad7c03f7ebad864abc0e900b35f4cae41ee786a15e58dc7cdb3a6e32ee3630084d5645af5675bc6c70ee8418112fb7d24121843ea85757f06c0587
|
7
|
+
data.tar.gz: 7788edd704c871de3f0902a2ecc32433bb01148b1ebf2df2bfcd9e41156dce1b986b7e7baad48e6f4a3084c967f01dd8dce7a1c55e733e0c7d43c96c6ee37718
|
data/README.md
CHANGED
@@ -77,19 +77,30 @@ Run `rum --tasks` to view the installed tasks:
|
|
77
77
|
|
78
78
|
```bash
|
79
79
|
rum build # Build `build` stage
|
80
|
-
rum build:clean # Remove any temporary images and products from `build` stage
|
81
|
-
rum build:shell[shell] # Shell into `build` stage
|
82
80
|
rum clean # Remove any temporary images and products
|
81
|
+
rum clean:build # Remove any temporary images and products through `build` stage
|
82
|
+
rum clean:deploy # Remove any temporary images and products through `deploy` stage
|
83
|
+
rum clean:test # Remove any temporary images and products through `test` stage
|
83
84
|
rum clobber # Remove any generated files
|
84
85
|
rum deploy # Build `deploy` stage
|
85
|
-
rum
|
86
|
-
rum deploy
|
86
|
+
rum shell:build[shell] # Shell into `build` stage
|
87
|
+
rum shell:deploy[shell] # Shell into `deploy` stage
|
88
|
+
rum shell:test[shell] # Shell into `test` stage
|
87
89
|
rum test # Build `test` stage
|
88
|
-
rum test:clean # Remove any temporary images and products from `test` stage
|
89
|
-
rum test:shell[shell] # Shell into `test` stage
|
90
90
|
```
|
91
91
|
|
92
|
-
## Naming Convention
|
92
|
+
## Task Naming Convention
|
93
|
+
|
94
|
+
As of v0.3, rum runner uses a "verb-first" naming convention (eg. `clean:stage`) for tasks.
|
95
|
+
|
96
|
+
To revert to the previous convention of "stage-first" (eg. `stage:clean`) use the environmental variable `RUM_TASK_NAMES`:
|
97
|
+
|
98
|
+
```bash
|
99
|
+
export RUM_TASK_NAMES=STAGE_FIRST # => rum stage:clean
|
100
|
+
export RUM_TASK_NAMES=VERB_FIRST # => rum clean:stage (default)
|
101
|
+
```
|
102
|
+
|
103
|
+
## Image Naming Convention
|
93
104
|
|
94
105
|
The name of the images are taken from the first argument to the main block and appended with the name of the stage.
|
95
106
|
|
data/lib/rumrunner/manifest.rb
CHANGED
@@ -144,7 +144,7 @@ module Rum
|
|
144
144
|
#
|
145
145
|
def shell(*args, &block)
|
146
146
|
target = Rake.application.resolve_args(args).first
|
147
|
-
name = :
|
147
|
+
name = task_name shell: target
|
148
148
|
image = "#{@image}-#{target}"
|
149
149
|
iidfile = File.join(root, image)
|
150
150
|
|
@@ -234,7 +234,7 @@ module Rum
|
|
234
234
|
# Install clean tasks for cleaning up stage image and iidfile
|
235
235
|
def stage_clean(name, iidfile, deps)
|
236
236
|
# Clean stage image
|
237
|
-
desc "Remove any temporary images and products
|
237
|
+
desc "Remove any temporary images and products through `#{name}` stage"
|
238
238
|
task task_name(clean: name) do
|
239
239
|
if File.exist? iidfile
|
240
240
|
sh "docker", "image", "rm", "--force", File.read(iidfile)
|
@@ -265,7 +265,7 @@ module Rum
|
|
265
265
|
# Install clobber tasks for cleaning up generated files
|
266
266
|
def artifact_clobber(name, path)
|
267
267
|
desc "Remove any generated files"
|
268
|
-
task :clobber do
|
268
|
+
task :clobber => :clean do
|
269
269
|
rm name if File.exist?(name)
|
270
270
|
rm_r path if Dir.exist?(path) && path != "."
|
271
271
|
end
|
@@ -274,13 +274,13 @@ module Rum
|
|
274
274
|
##
|
275
275
|
# Get name of support task
|
276
276
|
def task_name(verb_stage)
|
277
|
-
case ENV["
|
277
|
+
case ENV["RUM_TASK_NAMES"]&.upcase
|
278
278
|
when "STAGE_FIRST"
|
279
279
|
verb_stage.first.reverse
|
280
280
|
when "VERB_FIRST"
|
281
281
|
verb_stage.first
|
282
282
|
else
|
283
|
-
verb_stage.first
|
283
|
+
verb_stage.first
|
284
284
|
end.join(":").to_sym
|
285
285
|
end
|
286
286
|
end
|
data/lib/rumrunner/version.rb
CHANGED