Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local create, Part the First #785

Merged
merged 33 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c9e5909
Write to docker-compose.local.yml with confirmation
SoManyHs May 29, 2019
feaa70b
Read task definition
SoManyHs May 30, 2019
604c4ac
Refactor control flow
SoManyHs May 30, 2019
6bd8470
Fix license, add package comment
SoManyHs Jun 5, 2019
e44779a
Add assertion for TTY in convert task definition
SoManyHs Jun 6, 2019
e4350dc
WIP convert task def
SoManyHs Jun 5, 2019
83b374d
Update docker/go-units
SoManyHs Jun 6, 2019
8b592f8
Add convertToTmpfs
SoManyHs Jun 6, 2019
4a31e38
Add convertUlimits
SoManyHs Jun 6, 2019
462e3f0
Add convertLinuxParameters func
SoManyHs Jun 6, 2019
b86003e
Add convertDevices
SoManyHs Jun 6, 2019
97dbea3
Add ConvertShmSize
SoManyHs Jun 6, 2019
6c4a229
Add convertEnvironment, capAdd, capDrop
SoManyHs Jun 6, 2019
e7cd424
Cleanup empty checks
SoManyHs Jun 7, 2019
88f54bb
Convert extrahosts
SoManyHs Jun 7, 2019
8ba0ae0
Convert HealthCheck
SoManyHs Jun 7, 2019
337bd2b
Convert labels
SoManyHs Jun 7, 2019
c0ca8a0
Convert Logging
SoManyHs Jun 7, 2019
c3fdc46
Convert volumes
SoManyHs Jun 7, 2019
3a2f29b
Convert ports
SoManyHs Jun 8, 2019
40de9e7
Convert StdinOpen
SoManyHs Jun 8, 2019
3939b11
Convert Sysctls
SoManyHs Jun 8, 2019
fe83f86
WIP add secrets
SoManyHs Jun 9, 2019
c8a8dfb
Refactor to encapsulate read/write/conversion logic into interface
SoManyHs Jun 10, 2019
84b079c
go fmt
SoManyHs Jun 10, 2019
9bb2696
WIP Get Secret Value from secret manager
SoManyHs Jun 10, 2019
5aa6f62
Ran make generate
SoManyHs Jun 10, 2019
b695e4f
Fix bug in ReadTaskDefinition
SoManyHs Jun 10, 2019
52b4b0d
Fix bug in convert shmsize
SoManyHs Jun 10, 2019
d734cc9
Add public docstrings, cleanup formatting
SoManyHs Jun 11, 2019
3a73a58
Unit test localproject.Write
SoManyHs Jun 11, 2019
4825679
Change file permissions on local compose output
SoManyHs Jun 13, 2019
86efe88
Merge branch 'ecs-local' into local-create
SoManyHs Jun 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 16 additions & 147 deletions ecs-cli/Gopkg.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion ecs-cli/modules/cli/compose/adapter/convert.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2015-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
Expand All @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package adapater converts docker compose objects into ECS objects
package adapter

import (
Expand Down
7 changes: 6 additions & 1 deletion ecs-cli/modules/cli/compose/adapter/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ func TestConvertVolumesFrom_V2_Rw(t *testing.T) {
}

func TestConvertToTmpfs(t *testing.T) {
tmpfs := []string{"/run:rw,noexec,nosuid,size=65536k", "/foo:size=1gb", "/bar:size=1gb,rw,runbindable"}
tmpfs := []string{"/run:rw,noexec,nosuid,size=65536k", "/foo:size=1gb", "/bar:size=1gb,rw,runbindable", "/run:size=64MiB" }

tmpfsMounts, err := ConvertToTmpfs(tmpfs)
assert.NoError(t, err, "Unexpected error converting tmpfs")
mount1 := tmpfsMounts[0]
mount2 := tmpfsMounts[1]
mount3 := tmpfsMounts[2]
mount4 := tmpfsMounts[3]

assert.Equal(t, "/run", aws.StringValue(mount1.ContainerPath))
assert.Equal(t, []string{"rw", "noexec", "nosuid"}, aws.StringValueSlice(mount1.MountOptions))
Expand All @@ -136,6 +137,10 @@ func TestConvertToTmpfs(t *testing.T) {
assert.Equal(t, "/bar", aws.StringValue(mount3.ContainerPath))
assert.Equal(t, []string{"rw", "runbindable"}, aws.StringValueSlice(mount3.MountOptions))
assert.Equal(t, int64(1024), aws.Int64Value(mount3.Size))

assert.Equal(t, "/run", aws.StringValue(mount4.ContainerPath))
assert.Equal(t, []string{}, aws.StringValueSlice(mount4.MountOptions))
assert.Equal(t, int64(64), aws.Int64Value(mount4.Size))
}

func TestConvertToTmpfs_NoPath(t *testing.T) {
Expand Down
32 changes: 0 additions & 32 deletions ecs-cli/modules/cli/compose/entity/mock/entity.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions ecs-cli/modules/cli/compose/factory/mock/factory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading