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

feat(manifest): allow additional docker build overrides in manifest #1059

Merged
merged 54 commits into from
Aug 5, 2020
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f740e81
Add context field to mft
bvtujo Jun 5, 2020
add851a
update mft comments
bvtujo Jun 17, 2020
637dccd
Add comments to Context() and context to testdata
bvtujo Jun 25, 2020
5ef0e0a
fix unit test expectations for context
bvtujo Jun 26, 2020
fb58231
feat(workspace): add CopilotDirPath as public function
bvtujo Jul 11, 2020
ec1e5fd
Add mocking for UnmarshalService and combine dockerfile path and cont…
bvtujo Jul 13, 2020
0689c6a
move Dockerfile() and Context() functions to svc package since they a…
bvtujo Jul 17, 2020
c07791a
chore(manifest): add custom YAML unmarshaler for docker build args
bvtujo Jul 17, 2020
19f8380
chore(cli): update manifest & service deploy tests
bvtujo Jul 17, 2020
c5c0956
chore(templates): update buildspec to parse context, args, dockerfiles
bvtujo Jul 17, 2020
d0799b2
add build args struct to docker
bvtujo Jul 17, 2020
1ad4212
chore(docker): refactor Build to take a struct instead of args
bvtujo Jul 17, 2020
597cab4
Fix svc deploy test syntax
bvtujo Jul 18, 2020
509b21c
fix bad method signatures
bvtujo Jul 18, 2020
2d910d0
rename ARGS to build_args in buildspec
bvtujo Jul 18, 2020
a3c3862
Rename Build input arg to in
bvtujo Jul 21, 2020
185923f
remove dockerParams struct and directly pass in docker.BuildArguments
bvtujo Jul 21, 2020
22e3681
fix typo in Dockerfile() comment
bvtujo Jul 21, 2020
823c77e
Add comments describing BuildArguments fields
bvtujo Jul 21, 2020
ca0bf23
Streamline logic checking for Context field.
bvtujo Jul 21, 2020
054f503
Fix commit error from GH and reword docker tests
bvtujo Jul 21, 2020
8a385f5
Convert BuildArgs to pointer for checking
bvtujo Jul 22, 2020
719e9cf
Add unit tests for UnmarshalYAML
bvtujo Jul 23, 2020
34d84db
add descriptive error and fix error case test
bvtujo Jul 23, 2020
3ed58cd
Refactor build argument logic to package manifest
bvtujo Jul 23, 2020
da4964c
rename test function for CopilotDirPath tests
bvtujo Jul 23, 2020
ac2ec31
allow svc.Build() to infer Dockerfile name
bvtujo Jul 23, 2020
6e63e42
add fixes to buildspec commands and echo statements
bvtujo Jul 28, 2020
6cccd75
Revert to old default for manifests
bvtujo Jul 28, 2020
85bd6a0
Merge branch 'master' into mft-context
bvtujo Jul 28, 2020
ef7feb5
Fix buildspec to remove extra spaces
bvtujo Jul 28, 2020
2139b32
Update repository package to take docker.BuildArguments
bvtujo Jul 30, 2020
f9cb57e
Update docker test cases to not use imageName()
bvtujo Jul 30, 2020
a247546
Update interfaces to take docker.BuildArguments
bvtujo Jul 30, 2020
129beb8
implement new docker args signature
bvtujo Jul 30, 2020
7b38a38
go mod tidy
bvtujo Jul 30, 2020
f97d542
Implement new docker args in task run
bvtujo Jul 30, 2020
6bb3a15
rename Build to BuildArgs in package manifest
bvtujo Jul 30, 2020
79dc17e
Fix test data to reflect prior default
bvtujo Jul 30, 2020
1cb5473
add sorting logic to build-arg parser for test stability
bvtujo Jul 30, 2020
f83de96
Use guard clauses, not else ifs, in svc.go
bvtujo Jul 30, 2020
39befaf
Comment to indicate successful unmarshaling
bvtujo Jul 30, 2020
b9b78ff
Remove unnecessary else clause in svc.go
bvtujo Jul 30, 2020
5d6e755
whitespace fixes
bvtujo Jul 30, 2020
4d5861f
fix unjoined context and dockerfile paths in guard clauses
bvtujo Jul 30, 2020
bcf19a8
Merge branch 'master' into mft-context
bvtujo Jul 30, 2020
951e132
remove test case to match master
bvtujo Jul 30, 2020
d0ea656
Merge branch 'master' into mft-context
bvtujo Jul 31, 2020
b500b6c
refactor svc package to return manifest.DockerBuildArgs and svcDeploy…
bvtujo Jul 31, 2020
80eaa2a
Edit comment in manifests
bvtujo Aug 4, 2020
d6aaa98
Update testdata to reflect manifest comment
bvtujo Aug 4, 2020
5c35c8b
Remove dependency on aws in svc deploy
bvtujo Aug 4, 2020
6424529
Merge branch 'master' into mft-context
bvtujo Aug 4, 2020
b22b186
Fix tests in repository to handle new Build() signature
bvtujo Aug 4, 2020
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
Prev Previous commit
Next Next commit
add build args struct to docker
bvtujo committed Jul 17, 2020
commit d0799b243aaf925893f527d4bcec22f67fc9052e
6 changes: 6 additions & 0 deletions internal/pkg/docker/docker.go
Original file line number Diff line number Diff line change
@@ -28,6 +28,12 @@ func New() Runner {
}
}

type BuildArguments struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v nice comments!

Dockerfile string
Context string
Args map[string]string
}

// Build will run a `docker build` command with the input uri, tag, and Dockerfile path.
func (r Runner) Build(uri, imageTag, path, context string, additionalTags ...string) error {
imageName := imageName(uri, imageTag)