shipitron 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile.release +1 -1
- data/README.md +3 -0
- data/lib/shipitron/cli.rb +2 -0
- data/lib/shipitron/client/load_application_config.rb +1 -0
- data/lib/shipitron/client/run_ecs_tasks.rb +2 -0
- data/lib/shipitron/server/deploy_application.rb +1 -0
- data/lib/shipitron/server/download_build_cache.rb +7 -2
- data/lib/shipitron/server/transform_cli_args.rb +2 -0
- data/lib/shipitron/server/upload_build_cache.rb +7 -2
- data/lib/shipitron/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: 9bd4d376f639bb5ebd80df8a467b8aaca8eac7f2d50ebb6a404683dbaea2fde5
|
4
|
+
data.tar.gz: d368aa28072880ae2580ed73fca2c78d40328b497d21d3a1d02139ccdfd77af5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26eafd5c78aafa2946e78e400e0c132820ca9b7b57dbbf0846fce2e11f290db649c7257ffb76283fa2bd86176fe38fe322a79077836ef9afd1eaefa306b43a3d
|
7
|
+
data.tar.gz: cf99dd7b011c3beb293b428418930f55aa0990a73027deda2c6c1b7e6d420db7b5584af89457acc0a0318553ebc0ed3bc53c3f18d49860c5c947647164f2ea9f
|
data/Dockerfile.release
CHANGED
data/README.md
CHANGED
@@ -9,6 +9,7 @@ applications:
|
|
9
9
|
dummy-app:
|
10
10
|
repository: git@github.com:outstand/dummy-app
|
11
11
|
cache_bucket: bucket
|
12
|
+
build_cache_location: tmp/build-cache.tar.gz
|
12
13
|
image_name: outstand/dummy-app
|
13
14
|
build_script: shipitron/build.sh
|
14
15
|
post_builds:
|
@@ -51,4 +52,6 @@ To release a new version:
|
|
51
52
|
- `docker run -it --rm -v ~/.gitconfig:/root/.gitconfig -v ~/.gitconfig.user:/root/.gitconfig.user -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.gem:/root/.gem -w /shipitron outstand/shipitron:dev rake release`
|
52
53
|
- `docker build -t outstand/shipitron:VERSION -f Dockerfile.release .`
|
53
54
|
- `docker push outstand/shipitron:VERSION`
|
55
|
+
- `docker tag outstand/shipitron:VERSION outstand/shipitron:latest`
|
56
|
+
- `docker push outstand/shipitron:latest`
|
54
57
|
- Update ECS task definition with new version
|
data/lib/shipitron/cli.rb
CHANGED
@@ -63,6 +63,7 @@ module Shipitron
|
|
63
63
|
option :repository, required: true
|
64
64
|
option :repository_branch, default: 'master'
|
65
65
|
option :bucket, required: true
|
66
|
+
option :build_cache_location, default: 'tmp/build-cache.tar.gz'
|
66
67
|
option :image_name, required: true
|
67
68
|
option :named_tag, default: 'latest'
|
68
69
|
option :region, required: true
|
@@ -86,6 +87,7 @@ module Shipitron
|
|
86
87
|
repository_url: options[:repository],
|
87
88
|
repository_branch: options[:repository_branch],
|
88
89
|
s3_cache_bucket: options[:bucket],
|
90
|
+
build_cache_location: options[:build_cache_location],
|
89
91
|
image_name: options[:image_name],
|
90
92
|
named_tag: options[:named_tag],
|
91
93
|
region: options[:region],
|
@@ -12,6 +12,7 @@ module Shipitron
|
|
12
12
|
context.repository_url = config.repository
|
13
13
|
context.repository_branch = config.repository_branch
|
14
14
|
context.s3_cache_bucket = config.cache_bucket
|
15
|
+
context.build_cache_location = config.build_cache_location
|
15
16
|
context.image_name = config.image_name
|
16
17
|
context.named_tag = begin
|
17
18
|
if config.named_tag.nil?
|
@@ -16,6 +16,7 @@ module Shipitron
|
|
16
16
|
required :shipitron_task
|
17
17
|
required :repository_url
|
18
18
|
required :s3_cache_bucket
|
19
|
+
required :build_cache_location
|
19
20
|
required :image_name
|
20
21
|
required :named_tag
|
21
22
|
required :ecs_task_defs
|
@@ -108,6 +109,7 @@ module Shipitron
|
|
108
109
|
'--name', context.application,
|
109
110
|
'--repository', context.repository_url,
|
110
111
|
'--bucket', context.s3_cache_bucket,
|
112
|
+
'--build-cache-location', context.build_cache_location,
|
111
113
|
'--image-name', context.image_name,
|
112
114
|
'--named-tag', context.named_tag,
|
113
115
|
'--region', cluster.region,
|
@@ -8,17 +8,18 @@ module Shipitron
|
|
8
8
|
|
9
9
|
required :application
|
10
10
|
required :s3_cache_bucket
|
11
|
+
required :build_cache_location
|
11
12
|
|
12
13
|
def call
|
13
14
|
Logger.info "Downloading build cache from bucket #{s3_cache_bucket}"
|
14
15
|
|
15
|
-
s3_file = bucket.files.get("#{application}.build-cache.
|
16
|
+
s3_file = bucket.files.get("#{application}.build-cache.archive")
|
16
17
|
if s3_file.nil?
|
17
18
|
Logger.warn 'Build cache not found.'
|
18
19
|
return
|
19
20
|
end
|
20
21
|
|
21
|
-
build_cache = Pathname.new("/home/shipitron/#{application}
|
22
|
+
build_cache = Pathname.new("/home/shipitron/#{application}/#{build_cache_location}")
|
22
23
|
build_cache.parent.mkpath
|
23
24
|
build_cache.open('wb') do |local_file|
|
24
25
|
local_file.write(s3_file.body)
|
@@ -36,6 +37,10 @@ module Shipitron
|
|
36
37
|
context.s3_cache_bucket
|
37
38
|
end
|
38
39
|
|
40
|
+
def build_cache_location
|
41
|
+
context.build_cache_location
|
42
|
+
end
|
43
|
+
|
39
44
|
def bucket
|
40
45
|
@bucket ||= FetchBucket.call!(name: s3_cache_bucket).bucket
|
41
46
|
end
|
@@ -13,6 +13,7 @@ module Shipitron
|
|
13
13
|
required :repository_url
|
14
14
|
optional :repository_branch
|
15
15
|
required :s3_cache_bucket
|
16
|
+
required :build_cache_location
|
16
17
|
required :image_name
|
17
18
|
required :named_tag
|
18
19
|
required :region
|
@@ -37,6 +38,7 @@ module Shipitron
|
|
37
38
|
repository_url
|
38
39
|
repository_branch
|
39
40
|
s3_cache_bucket
|
41
|
+
build_cache_location
|
40
42
|
named_tag
|
41
43
|
region
|
42
44
|
clusters
|
@@ -8,11 +8,12 @@ module Shipitron
|
|
8
8
|
|
9
9
|
required :application
|
10
10
|
required :s3_cache_bucket
|
11
|
+
required :build_cache_location
|
11
12
|
|
12
13
|
def call
|
13
14
|
Logger.info "Uploading build cache to bucket #{s3_cache_bucket}"
|
14
15
|
|
15
|
-
build_cache = Pathname.new("/home/shipitron/#{application}
|
16
|
+
build_cache = Pathname.new("/home/shipitron/#{application}/#{build_cache_location}")
|
16
17
|
unless build_cache.exist?
|
17
18
|
Logger.warn 'Build cache not found.'
|
18
19
|
return
|
@@ -20,7 +21,7 @@ module Shipitron
|
|
20
21
|
|
21
22
|
build_cache.open('rb') do |local_file|
|
22
23
|
bucket.files.create(
|
23
|
-
key: "#{application}.build-cache.
|
24
|
+
key: "#{application}.build-cache.archive",
|
24
25
|
body: local_file.read
|
25
26
|
)
|
26
27
|
end
|
@@ -35,6 +36,10 @@ module Shipitron
|
|
35
36
|
context.s3_cache_bucket
|
36
37
|
end
|
37
38
|
|
39
|
+
def build_cache_location
|
40
|
+
context.build_cache_location
|
41
|
+
end
|
42
|
+
|
38
43
|
def bucket
|
39
44
|
@bucket ||= FetchBucket.call!(name: s3_cache_bucket).bucket
|
40
45
|
end
|
data/lib/shipitron/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipitron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Schlesinger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|