Commit Graph

947 Commits

Author SHA1 Message Date
priyawadhwa 3654ea4a02
Merge pull request #321 from daniel-harrison/master
Enable shared config for s3
2018-08-27 16:06:22 -07:00
Priya Wadhwa 935d322f1d Rebased on master 2018-08-27 14:18:24 -07:00
Priya Wadhwa 64a0b1d75f Added a KanikoStage type for each stage of a Dockerfile
I added a KanikoStage to hold each stage of the Dockerfile along with
information about each stage that would be useful later on.

The new KanikoStage type holds the stage itself, along with some
additional information:

1. FinalStage -- whether the current stage is the final stage
2. BaseImageStoredLocally/BaseImageIndex -- whether the base image for
this stage is stored locally, and if so what the index of the base image
is
3. SaveStage -- whether this stage needs to be saved for use in a future
stage

This is the first part of a larger refactor for building stages, which
will later make it easier to add layer caching.
2018-08-27 14:15:04 -07:00
Priya Wadhwa 7080a8dd69 Add specific files from tar archives to list of snapshotted filesa
I changed UnpackLocalTarArchive to return a list of files that were
extracted, so that the list of snapshotted files for ADD is more
accurate. Previously, we used to add all files in the extracted dir to
be snapshotted, but this could result in preexisting files being
snapshotted again.
2018-08-27 13:44:39 -07:00
Priya Wadhwa 9a93f5bad9 Snapshot only specific files for COPY
Before #289 was merged, when copying over directories for COPY kaniko
would get a list of all files at the destination specified and add them
to the list of files to be snapshotted. If the destination was root it
would add all files. This worked because the snapshotter made sure the
file had been changed before adding it to the layer.

After #289, we changed the logic to add all files snapshotted to a layer
without checking if the files had been changed. This created the bug in
got all the files at root and added them to the layer without checking
if they had been changed.

This change should fix this bug. Now, the CopyDir function returns a
list of files it copied over and only those files are added to the list
of files to be snapshotted.

Should fix #314
2018-08-27 11:39:00 -07:00
Christie Wilson 7f64037a8c Separate snapshotting of parent dirs from files
To make the logic a bit more clear, when snapshotting files, the
parent dirs are now snapshotted in a different loop from the files we
are actually trying to snapshot. Unfortunately this loop is nearly
duplicated but I did managed to group some fo the related logic
together:
- A function to check if the file should be snapshotted (e.g. isn't
whitelisted, etc.)
- Created a `Tar` type to handle some of the logic around tar-ing, e.g.
tracking hardlinks and stat-ing files before adding them

One side effect of this is that now when snapshoting the file system,
files will be stat-ed twice.
2018-08-24 16:34:59 -07:00
Christie Wilson 2fe93f2911 No longer try to verify kaniko dir isn't snapshotted
This test had previously (before #231) been making a change to a file in
the kaniko dir, then checking that it isn't being snapshotted. This was
to test the whitelisting logic, which makes sure that changes to /kaniko
aren't included in images. However the test creates a temporary dir, so
the kaniko dir is actually in /tmp/<some temp dir>/kaniko, and
in #231 the logic was simplified to no longer have a special case for
tests. The test continued to pass because `MaybeAdd` noticed that the
kaniko file wasn't changing, and didn't add it. After changing this to
always add the files, it revealed that this was left behind by accident.

I also opened #307 to add integration test coverage for this logic.

I also marked `CheckErrorAndDeepEqual` as a helper function so that when
it fails, the line number reported is where that was called.
2018-08-23 18:23:46 -07:00
Christie Wilson 607af5f7a6 Always snapshot files in COPY and RUN commands
Kaniko uses mtime (as well as file contents and other attributes) to
determine if files have changed. COPY and ADD commands should _always_
update the mtime, because they actually overwrite the files. However it
turns out that the mtime can lag, so kaniko would sometimes add a new
layer when using COPY or ADD on a file, and sometimes would not. This
leads to a non-deterministic number of layers.

To fix this, we have updated the kaniko commands to be more
authoritative in declaring when they have changed a file (e.g. WORKDIR
will now only create the directory when it doesn't exist) and we will
trust those files and _always_ add them, instead of only adding them if
they haven't changed.

It is possible for RUN commands to also change the filesystem, in which
case kaniko has no choice but to look at the filesystem to determine
what has changed. For this case we have added a call to `sync` however
we still cannot guarantee that sometimes the mtime will not lag, causing the
number of layers to be non-deterministic. However when I tried to cause
this behaviour with the RUN command, I couldn't.

This changes the snapshotting logic a bit; before this change, the last
command of the last stage in a Dockerfile would always scan the whole
file system and ignore the files returned by the kaniko command. Instead
we will now trust those files and assume that the snapshotting
performed by previous commands will be adequate.

Docker itself seems to rely on the storage driver to determine when
files have changed and so doesn't have to deal with these problems
directly.

An alternative implementation would use `inotify` to track which files
have changed. However that would mean watching every file in the
filesystem, and adding new watches as files are added. Not only is there
a limit on the number of files that can be watched, but according to the
man pages a) this can take a significant amount of time b) there is
complication around when events arrive (e.g. by the time they arrive,
the files may have changed) and lastly c) events can be lost, which
would mean we'd run into this non-deterministic behaviour again anyway.

Fixes #251
2018-08-23 18:23:39 -07:00
Priya Wadhwa d867eadbb0 Review code comments; improved error messages for push 2018-08-23 14:27:13 -07:00
Priya Wadhwa cfa822f178 Refactor command line arguments and the executor
In this refactor I:

1. Created KanikoOptions to make it easier to pass around arguments
passed in through the command line
2. Reorganized executor.go by putting the logic for pushing the image in
a new file push.go
3. Made some error messages clearer
4. Fixed a mistake in the README for pushing to AWS
5. Marked the --bucket flag as hidden since we want people to use
--context instead, and marked an aws flag as hidden which is set in a
vendored directorya
2018-08-23 13:30:36 -07:00
daniel-harrison 587a5e28e3 Enable shared config for s3 2018-08-23 20:53:43 +10:00
Priya Wadhwa 5e5623e5a4 Fix bug in SaveStage function for multistage builds
This change should fix the bug in #294, where kaniko wasn't recognizing
that a stage would be used in a later build and so wasn't saving it as a
tarball.

Each stage of the Dockerfile has a Name and a BaseName (FROM BaseName as
Name), but if a Name isn't specified then it's set to the same value as
BaseName. Our test cases weren't complete enough to catch this
distinction, which is why this bug occurred.

I added more test cases to the unit tests to make sure this fix works.
2018-08-20 15:10:17 -07:00
Priya Wadhwa d8ae5618af Get absolute path of file before checking whitelist
Issue 291 pointed out that symlink "../proc/self/mounts" in the fedora image wasn't being extracted properly and kaniko was erroring out.
This is because the file path wasn't absolute so kaniko wasn't recognizing it as a whitelisted path.
With this change, we first resolve a path to it's absolute path before checking the whitelist.
2018-08-17 18:29:11 -04:00
Guilherme Rezende 60bdda4c49 Add support for insecure registry (#169) 2018-08-15 11:28:16 -07:00
priyawadhwa 3a9b4fe612
ignore sockets when adding to tar (#288) 2018-08-13 11:26:30 -07:00
priyawadhwa 4e77fa000d
Set default home value (#281)
* Set default home value

* Apply  default home value based on user for run commands

* rename default home function
2018-08-10 12:58:07 -07:00
priyawadhwa 52e9863810
fix add command bug when adding remote URLs (#277) 2018-08-07 17:10:27 -07:00
Andrea Giardini c44c317b00 Environment variables with multiple '=' are not parsed correctly (#278)
* Provide failing test for an env variable with multiple '='

* Environment variables are split only in two parts
2018-08-07 10:22:48 -07:00
Dale Tristram 2261adca68 Ensure cmd.SysProcAttr is set before modifying it (#275) 2018-08-07 10:09:49 -07:00
priyawadhwa 954b6129d6
Extract intermediate stages to filesystem (#266)
* WIP

* save and extract stage tarballs if there are dependencies
2018-08-02 09:40:24 -07:00
priyawadhwa 71c83e369c
Only add whiteout files once (#270)
* Only add whiteout files once

* Updated vars
2018-08-01 17:27:20 -07:00
dlorenc 8a2492d241
Fix process group handling. (#271)
Also add a makefile target to build the debug image.
2018-08-01 16:47:32 -07:00
Nick Kubala e45d1f6aac
Update deps 2018-07-31 16:23:23 -07:00
dlorenc e43968f02f
Set a kaniko user agent. (#262) 2018-07-30 13:03:25 -07:00
priyawadhwa cac00b9cb2
Add --target flag for multistage builds (#255)
* Add --target flag for multistage builds

* change validate to validateTarget
2018-07-30 09:43:23 -07:00
balopat 6fe9ea4248 fixes #247 killing grandchildren processes 2018-07-26 13:56:19 -07:00
Jason Hall 0e3fc0bcd7 Look for usable on-cluster credentials using k8schain (#243)
* dep ensure and use k8schain

* checkpoint

* fix vendoring, stuff builds

* Use k8schain for pushes too

* Use NewNoClient

* update ggcr dep

* Move k8schain usage to image_util.go
2018-07-21 10:22:13 -07:00
priyawadhwa eb6faa05a0
Save each stage in multistage dockerfiles as a tarball (#244)
* resolve basenames in dockerfile to fix multistage bug

* WIP

* WIP

* Save dockerfile stages as tarballs

* added unit tests

* fix unit tests
2018-07-19 11:27:49 -07:00
dlorenc 8716936977
Switch the valid URL to https://google.com. (#242)
It appears sometimes Github goes down :)
2018-07-18 09:43:12 -07:00
Christie Wilson 5f9fb2cb8d Fix remote URL test (#237)
When this test was originally created, an HTTP get to
`https://url.com/something/not/real` probably failed, but now it
will return a `503`, i.e. the `http.Get` call will succeed.

This test will now use a URL which should not reasonable ever
succeed (famous last words). Alternatively we could use dependency
injection and mock `http.Get` but it doesn't seem worth it.

This commit also updates the test to use `Run` to run each test
in the table test as a separate test so we can get a clear indication
which cases fail and which succeed.
2018-07-17 17:21:51 -07:00
priyawadhwa 31b7cd3732
Fix bug in copy command by refactoring whitelist checks (#231)
* Fixed bug

* WIP

* fix unit tests
2018-07-10 08:23:35 -07:00
Christian Jantz 65d7b0a9aa Feature/contextsources (#195)
* added switch to extract different sources as build context

* first rough implementation of aws s3

* added buildcontext package and interface

* added GetBuildContext func to buildcontext.go
added fallback to gcs
renamed GC struct to GCS

* improved the default behavior of build context retrieval

* renamed gc:// to gs:// in order to follow common standards

* renamed struct File to Dir and some cleanup work

* moved context.tar suffix to the buildcontext processors where it is needed

* added buildcontext retrieval as struct variable

added fallback if prefix in bucket specifier is present

* cleanup if structures

* added prefix to s3

* WIP

* Fixed build context bugs

* refactored build context
2018-07-06 06:24:50 -07:00
xanonid d411bd6daf Track file ownership and use file ownership from base images (#209)
* Track file ownership and use file ownership from base images

* Fix fs_util_test - use current uid/gid.
2018-06-22 15:11:02 -07:00
Sharif Elgamal a7c82cf6f6
adding reproducible flag (#205)
* adding reproducible test

* newer version of go-containerregistry

* new ImageOptions

* switch reproducible flag to default to false

* small fixes

* update dep
2018-06-22 12:00:44 -07:00
Priya Wadhwa 8453a5bde0
Merge branch 'master' of github.com:GoogleContainerTools/kaniko into snapshot 2018-06-21 14:38:18 -07:00
Priya Wadhwa 54282e3e8c
Fix bug in snapshotting 2018-06-21 14:07:59 -07:00
Priya Wadhwa 89c9f15bde Add --single-snapshot flag to snapshot once after the build 2018-06-13 11:22:12 -07:00
Priya Wadhwa 44d7266058
Resolve env replacement for FROM command 2018-06-04 11:51:33 -07:00
Jon Johnson 1bb0df22b3 Fix MountPaths breakage 2018-06-03 01:04:56 +00:00
Jon Johnson 8b0a1a7689 dep update go-containerregistry 2018-06-03 00:59:34 +00:00
Sharif Elgamal 5e6b60f46e
adding metadata tests back to integration tests (#185)
* adding metadata tests back to integration tests and fixing resulting bugs

* fix onbuild and default env

* removing old test files

* adding the ArgsEscaped boolean on CMD commands

* fix onbuild test

* ignore failing test until container-diff is fixed

* code comments

* adding todo to remove uncomment failing test
2018-05-24 11:28:32 -07:00
priyawadhwa 0881b7c320
Merge pull request #193 from priyawadhwa/bug
Resolve environment replacement for arg
2018-05-21 18:39:33 -07:00
Priya Wadhwa d6bb88f924
Resolve environment replacement for arg 2018-05-21 14:51:00 -07:00
Priya Wadhwa e3f4dc479d
Move all files in executor image to /kaniko directory 2018-05-21 14:08:06 -07:00
Priya Wadhwa 577f448993
Make sure necessary files aren't deleted for multistage builds 2018-05-21 11:20:32 -07:00
priyawadhwa beb00f0bdb
Merge pull request #184 from jesusofsuburbia/master
Allow multiple destinations
2018-05-17 11:41:34 -07:00
Maximilian Schrupp b6cb74b2be include stderr of RUN commands in log output (#187) 2018-05-17 07:47:59 -07:00
jesusofsuburb1a 4c190a7037 allow multiple destinations, error handling for each push 2018-05-17 09:35:41 +02:00
dlorenc 347d835781
Add a mode to save to a tarball instead of pushing. (#178) 2018-05-15 15:32:27 -07:00
Sharif Elgamal f8aa88b119
Integration test refactoring (#126)
* integration test refactoring

* config file cleanup

* more test refactoring

* remove debug file

* moving around more files

* fixing up integration tests

* integration tests work

* some housekeeping

* fixing tests

* addressing comments

* debugging

* debugging

* actual debugging

* skip integration tests for travis

* install container-diff before integration tests

* syntax

* make test failures less noisy

* fixing tests

* hopefully fixing CI?

* fixes

* more fixes

* let's actually fix CI

* more testing

* testing

* proper auth

* typos

* adding support for args in integration tests

* formatting

* formatting

* adding support for testing bucket context

* adding bucket test dockerfile

* addressing comments

* syntax
2018-05-15 13:42:35 -07:00
Priya Wadhwa 6934f785c8
Pass in clone of buildargs for dockerfile parsing 2018-05-14 16:19:26 -07:00
priyawadhwa cde277c374
Merge pull request #141 from priyawadhwa/multistage
Support multi stage builds
2018-05-14 15:41:18 -07:00
Christian Jantz fbe3e05801 WIP: Feature/healthcheck signal (#177)
* added basic healthcheck implementation

* updated go-containerregistry version

* added build args parameter to healthcheck execute

* added go-containerregistry HealthCheck passing

* dereferenced health for conversion
2018-05-14 14:28:24 -07:00
Priya Wadhwa 459ddffb3c
Updated tests 2018-05-11 16:19:33 -07:00
Priya Wadhwa 282f8abbee
Merge master, refactor to work with ARG 2018-05-11 15:53:11 -07:00
Priya Wadhwa 4de14c34dd
Wrap BuildArgs in our own type 2018-05-11 10:23:13 -07:00
Priya Wadhwa 33f4805f62
Merged master, fixed merge conflict 2018-05-10 13:51:23 -07:00
priyawadhwa 676e6696b6
Merge pull request #172 from priyawadhwa/symlink-bug
Ignore symlinks during file extraction if link is whitelisted
2018-05-10 14:07:07 -04:00
Priya Wadhwa 347ce66a9b
Merged master, fixed merge conflict 2018-05-09 13:50:33 -07:00
Priya Wadhwa 26d8501489
Support BuildArgs for arg command 2018-05-09 12:24:38 -07:00
Priya Wadhwa f5b8457405
Add shell command to commands.go 2018-05-09 12:01:05 -07:00
Priya Wadhwa d040c89af6
Ignore symlinks during file extraction if link is whitelisted 2018-05-08 11:02:29 -07:00
Priya Wadhwa 7fbc21ec73
Merged master, fixed merge conflict 2018-05-07 09:14:17 -07:00
priyawadhwa 60cbc549af
Merge pull request #159 from chrisz100/feature/cmd_stopsignal
Feature/cmd stopsignal
2018-05-02 11:50:45 -04:00
priyawadhwa 1fca51e6be Update CreatedBy field in config history (#163) 2018-05-02 00:36:12 -07:00
Priya Wadhwa 67a3727eba Merge branch 'master' of github.com:GoogleContainerTools/kaniko into multistage 2018-05-01 11:29:51 -04:00
Christian Jantz dbdbee035d Merge branch 'master' into feature/cmd_stopsignal 2018-05-01 12:54:55 +02:00
Christian Jantz d63bc6da4b set fixed index for resolvedEnv slice on environment replacement - will always be len 1 2018-05-01 12:29:57 +02:00
Christian Jantz b5e68f4b7b added signal validation 2018-05-01 12:12:36 +02:00
Priya Wadhwa a1acbe8aa8 Fixed ResolveStages 2018-04-30 22:37:45 -04:00
Christian Jantz 5af3645a83 added shell command (#158)
* added shell command input to commands prepending shell

* Added shell command and test
2018-04-30 10:59:10 -07:00
Christian Jantz 281c69c6c6 Revert "added shell command input to commands prepending shell"
This reverts commit bccc664b19.
2018-04-28 17:43:42 +02:00
Christian Jantz 35b5f4b34a Revert "Added shell command and test"
This reverts commit ae47a03023.
2018-04-28 17:43:34 +02:00
Christian Jantz fd8d4b6170 added test for stopsignal command implementation 2018-04-28 17:41:40 +02:00
Christian Jantz d73f8c031f added stopsignal implementation 2018-04-28 17:30:18 +02:00
Christian Jantz ae47a03023 Added shell command and test 2018-04-28 15:12:04 +02:00
Christian Jantz bccc664b19 added shell command input to commands prepending shell 2018-04-28 15:02:33 +02:00
Priya Wadhwa 48688df7a6
Fixed merge conflicts, support multistage builds 2018-04-26 16:39:02 -07:00
Priya Wadhwa 904575d0cb
support multi stage builds 2018-04-26 15:40:41 -07:00
dlorenc cd5b744904
Switch from containers/image to go-containerregistry (#140)
* Vendor changes for go-containerregistry switch.

* Manual changes for go-containerregistry switch.

The biggest change is refactoring the tarball unpacking.

* Pull more of container-diff out.

* More vendor removals.

* More unit tests.
2018-04-25 19:21:05 -07:00
Priya Wadhwa 946b11b894
fix parent directory 2018-04-25 12:59:18 -07:00
Priya Wadhwa a211c1ec71
Make sure to snapshot parent directories of specific files for add/copy 2018-04-24 16:22:37 -07:00
Priya Wadhwa cf713fe0cd
fixed bug in copy 2018-04-23 18:13:27 -07:00
Priya Wadhwa 7dbc7a04a7
Support multi stage builds 2018-04-23 17:25:12 -07:00
dlorenc 844d9ef0d9
Add whiteout handling by switching to a two-phase approach. (#139)
* Add whiteout handling by switching to a two-phase approach.

Also only handle hardlinks within one layer

* Simplify the run test.
2018-04-23 12:50:21 -07:00
Carlos Sanchez 08ce2a0724 Add support for insecure docker registry (#131)
* Add support for insecure docker registry

Using --insecure-skip-tls-verify

Fixes #110

* Apply formatting
2018-04-20 10:47:06 -07:00
Priya Wadhwa be38696c7d Updated unit tests after refactor 2018-04-19 20:39:29 -07:00
Priya Wadhwa 6054d7e653 Refactor copy and add
Refactor copy and add

Add/copy pass integration tests
2018-04-19 20:27:41 -07:00
priyawadhwa 55557ff2e1
Merge pull request #112 from priyawadhwa/maintainer
Skip maintainer command
2018-04-18 10:46:17 -07:00
priyawadhwa 1b2d6bf4f6
Merge pull request #114 from r2d4/makefil
Org rename
2018-04-17 15:34:34 -07:00
Priya Wadhwa 5f03283a91
Merge branch 'master' of github.com:GoogleCloudPlatform/kaniko into maintainer 2018-04-17 12:33:16 -07:00
Matt Rickard cff201dee6 org rename from GoogleCloudPlatform to GoogleContainerTools 2018-04-17 11:45:39 -07:00
Cyrille Hemidy 6e5ed87633
Update add.go
fix comment
2018-04-17 10:57:03 +02:00
Cyrille Hemidy 3cc63ee941
Update tar_util.go
fix comment
2018-04-17 10:56:37 +02:00
Cyrille Hemidy 3796a1026d
Update image.go
fix comment
2018-04-17 10:55:55 +02:00
Cyrille Hemidy a18c8c01e1
Update util.go
fix comment
2018-04-17 10:54:11 +02:00
Cyrille Hemidy 84bab8fde2
Update command_util.go
fix comment
2018-04-17 10:53:34 +02:00
Cyrille Hemidy 44a97ae53f
Update run.go
fix comment
2018-04-17 10:52:35 +02:00
Priya Wadhwa 6548835db5
skip maintainer command 2018-04-16 14:21:37 -07:00
Priya Wadhwa b47f682c80
Fix 'text file busy' error 2018-04-16 13:40:02 -07:00
Priya Wadhwa 52c5759fc4
create list of build files 2018-04-16 11:08:40 -07:00
Priya Wadhwa c7bcc673fc
allow snapshot of kaniko certs so kaniko can build kaniko 2018-04-16 10:43:01 -07:00
priyawadhwa 0ddc2115a5
Merge pull request #78 from priyawadhwa/trigger
kaniko build trigger
2018-04-16 10:21:21 -07:00
dlorenc 0438539cbc
Set env at command run time instead of in the process. (#91) 2018-04-15 18:05:21 -07:00
priyawadhwa cebb4031b3 copy symlinks (#90) 2018-04-14 08:00:20 -07:00
dlorenc 167920c405
Refactor a bit. (#84)
Move all logic out of cmd/root.go into a package.
2018-04-14 07:59:37 -07:00
dlorenc da1eab7251
Set a user-agent for registry pushes. (#87) 2018-04-13 14:25:58 -07:00
Priya Wadhwa a8ecbbd365
Check if config fields are nil 2018-04-13 14:00:05 -07:00
Priya Wadhwa ec510a161b
change imports from k8s-container-builder to kaniko 2018-04-12 15:35:54 -07:00
Priya Wadhwa 954b1382d2
change k8s to kaniko 2018-04-12 15:30:32 -07:00
Priya Wadhwa 50ef6fe9c1
Build trigger for building kaniko executor image 2018-04-12 15:25:40 -07:00
Priya Wadhwa 8d2e646214
Fixed merge conflict 2018-04-12 15:03:09 -07:00
Priya Wadhwa d38319c416
Add support for scratch images, and integration test 2018-04-12 14:57:33 -07:00
Priya Wadhwa 3f561782a8
Fixed merge conflict, added validation 2018-04-12 10:30:25 -07:00
Priya Wadhwa cf90bd73d4
Fixed merge conflict 2018-04-11 15:05:12 -07:00
Priya Wadhwa c10c293f6b
Fixed merge conflict 2018-04-06 12:09:31 -07:00
Sharif Elgamal ce2b515d49
adding VOLUME command (#62)
* adding VOLUME command

* proper test project

* general fixes

* fixing project name

* fixing volume unit test

* fixing integration test

* adding tests

* adding util test

* fixing test

* actually create the volume mounted directory

* fix test
2018-04-06 12:02:57 -07:00
Priya Wadhwa 5dc47258a0
Fix merge conflict, change flag to snapshot-mode 2018-04-05 16:07:49 -07:00
Priya Wadhwa 59a5950e9e
onbuild integration test 2018-04-05 09:43:52 -07:00
Priya Wadhwa 27f964957b
Support for onbuild and unit test 2018-04-04 17:06:01 -07:00
Priya Wadhwa c63a03d123
rename to kaniko 2018-04-04 14:52:13 -07:00
Priya Wadhwa bd49b459e5
Merged master, fixed merge conflict 2018-04-04 14:38:39 -07:00
Priya Wadhwa 32b067af0c
Merged master, fixed conflict 2018-04-04 14:06:38 -07:00
Priya Wadhwa bf662d986b
Merge branch 'master', add examples 2018-04-04 10:42:14 -07:00
Priya Wadhwa 74c4a6629d
Unpack context.tar.gz from bucket 2018-04-03 14:58:50 -07:00
Priya Wadhwa e5542e8893
fixed comment 2018-04-03 10:43:35 -07:00
Priya Wadhwa fad0d25aec
Add README and update name to kaniko 2018-04-02 14:00:15 -07:00
Priya Wadhwa aa634e4c5c
Fixed merge conflict from master 2018-04-02 13:05:22 -07:00
sharifelgamal 7ebc313974 Merge branch 'master' of github.com:GoogleCloudPlatform/k8s-container-builder into user-cmd 2018-03-30 13:43:56 -07:00
sharifelgamal da0231a4d1 adding support of env variable replacement 2018-03-30 10:13:35 -07:00
Priya Wadhwa 687e00e3aa Fixed merge conflict 2018-03-29 20:50:52 -07:00
sharifelgamal abc85905c0 adding necessary functions 2018-03-29 12:54:00 -07:00
sharifelgamal b315cf1049 adding user command to switch 2018-03-29 11:54:51 -07:00
sharifelgamal bc78e2b838 adding USER command 2018-03-29 11:53:31 -07:00
Priya Wadhwa 89400b7410
Add command with unit tests 2018-03-28 13:34:00 -07:00
priyawadhwa 976afd1992
Merge pull request #47 from priyawadhwa/env-replacement
Support environment replacement in expose/copy/env
2018-03-28 13:14:56 -07:00
Priya Wadhwa 1b3b8accab
Fixed merge conflict 2018-03-28 12:47:19 -07:00
Priya Wadhwa e6eb5d1abf
Add hash function which only considers mtime when snapshotting 2018-03-27 17:43:35 -07:00
Priya Wadhwa ad17811c39
Update workdir to use default escape token 2018-03-27 15:15:55 -07:00
Priya Wadhwa 416c58e956
Merge branch 'env-replacement' of github.com:priyawadhwa/k8s-container-builder into workdir 2018-03-27 15:14:59 -07:00
Priya Wadhwa e885d6a5e6
Use default token for env replacement parsing 2018-03-27 09:51:36 -07:00
Priya Wadhwa 6eced4b12d
Merge branch 'master' of github.com:GoogleCloudPlatform/k8s-container-builder into env-replacement 2018-03-27 09:44:59 -07:00
Priya Wadhwa b64f23b078
Use default token for parsing 2018-03-27 09:44:51 -07:00
Priya Wadhwa 54a53489b2
Added comment to unit test 2018-03-26 16:56:28 -07:00
Priya Wadhwa 316e2847a7
Fixed merge conflict 2018-03-26 15:51:00 -07:00
Priya Wadhwa 41aed3948b
Merged master, fixed merge confict 2018-03-26 14:57:57 -07:00
Sharif Elgamal f38dd2d85b
Merge pull request #44 from sharifelgamal/label-cmd
adding LABEL command
2018-03-26 14:28:56 -07:00
sharifelgamal 96b0b12bc7
adding extra test case 2018-03-26 14:13:20 -07:00
Priya Wadhwa a45b8a3621
Add integration tests for unpacking from GCS bucket 2018-03-26 14:10:38 -07:00
Priya Wadhwa 85bbb6edff
Unpack tar from GCS bucket 2018-03-26 13:59:56 -07:00
sharifelgamal 4551bd0dc0
adding test for escaped words 2018-03-26 11:45:59 -07:00
sharifelgamal 986074eb45
unescaping values when appropriate 2018-03-26 11:38:43 -07:00
Priya Wadhwa 0787a93372
Workdir command and unit tests 2018-03-26 11:37:50 -07:00
Priya Wadhwa f6139f249a
Merge branch 'master' of github.com:GoogleCloudPlatform/k8s-container-builder into env-replacement 2018-03-26 10:50:23 -07:00
Priya Wadhwa dbb0774778
Environment replacement 2018-03-21 15:01:21 -07:00
Priya Wadhwa f56b3e9542
Environment replacement 2018-03-21 13:37:00 -07:00
sharifelgamal f352583bc1
boilerplate 2018-03-21 11:45:41 -07:00
sharifelgamal ba77ba0822
adding LABEL command 2018-03-21 11:34:37 -07:00
Priya Wadhwa cf24231121
WIP 2018-03-20 17:15:09 -07:00
Priya Wadhwa 58e70d8b77
Environment replacement 2018-03-20 15:56:31 -07:00
Priya Wadhwa 8d85fe91f3
resolve merge conflict 2018-03-20 15:17:08 -07:00
sharifelgamal 7bc750d793
add check for valid protocol 2018-03-20 14:27:58 -07:00
Priya Wadhwa cc0c672697
Add support for dest = '.' and additional DestinationFilepath test 2018-03-20 14:10:13 -07:00
Priya Wadhwa bf47ea928b
Integration tests for entrypoint 2018-03-20 13:05:20 -07:00
Priya Wadhwa d49c7c5ed1
Entrypoint command and unit tests 2018-03-20 12:58:38 -07:00
sharifelgamal 58ce938778
things are working now 2018-03-20 10:56:19 -07:00
Priya Wadhwa 5da78632a1
CMD command and unit tests 2018-03-20 10:40:45 -07:00
sharifelgamal 5578e683a1
Merge branch 'master' of github.com:GoogleCloudPlatform/k8s-container-builder into expose-cmd 2018-03-19 17:26:30 -07:00
sharifelgamal 288ac0b93b
adding EXPOSE command 2018-03-19 17:25:12 -07:00
Priya Wadhwa b3ec877b60
Use io.Copy when creating files 2018-03-19 16:37:12 -07:00
Priya Wadhwa 5ba9510ee8
Fixed merge conflict 2018-03-19 11:08:07 -07:00
Priya Wadhwa 070b0517d5
Get escape token by parsing ENV command 2018-03-19 10:42:40 -07:00
Priya Wadhwa f4e9eeb15a
Modified fs util functions 2018-03-19 09:47:51 -07:00
Priya Wadhwa de8cc1a285
Fixed check srcs function and create file with correct permissions 2018-03-16 14:11:06 -07:00
Priya Wadhwa af6a074fd6
Set escape token in separate function 2018-03-16 13:35:00 -07:00
Priya Wadhwa f33e507018
Replaced shlex with dockerfile/shell package 2018-03-16 12:20:50 -07:00
Priya Wadhwa 5ebf156d94
Fixed relative filepath and unit test 2018-03-15 13:47:40 -07:00
Priya Wadhwa 21a9207428
Copy command and unit tests 2018-03-14 17:06:46 -07:00
Priya Wadhwa 2d65be548a
Added env unit test, updated env integration test, fixed env 2018-03-12 15:18:15 -07:00
Priya Wadhwa ab0fc3802e
Add ENV command 2018-03-09 13:47:18 -08:00
Priya Wadhwa 27b09f28be
Add config as point to ExecuteCommand, fix snapshots 2018-03-09 11:30:35 -08:00
Priya Wadhwa 75e7e47b76
Added integration test, minor changes to files 2018-03-08 11:49:56 -08:00
Priya Wadhwa 04cca43ce4
Merged master and fixed merge conflicts 2018-03-08 10:18:04 -08:00
Priya Wadhwa 04b9e4bcdf
Use mutable source directly 2018-03-07 16:22:59 -08:00
Priya Wadhwa 98826ef951
Changed /work-dir to /kbuild 2018-03-07 15:38:22 -08:00
Priya Wadhwa cefb4448b1
Integration tests for run cmd 2018-03-07 15:34:56 -08:00
Priya Wadhwa 6668fa0d6f
Update add to tar to correctly handle hard links 2018-03-07 15:34:14 -08:00
Priya Wadhwa 3195b84c25
Fixed integration tests, changed directory to /work-dir 2018-03-06 15:25:04 -08:00
Priya Wadhwa 448e9dc3ce
Removed panic and added logging 2018-03-02 13:39:51 -08:00
Priya Wadhwa e7b8912ec6
Updated AppendLayer to include author 2018-03-01 13:10:44 -08:00
Priya Wadhwa 142ec6aa98
Fixed image 2018-02-28 14:53:33 -08:00
Priya Wadhwa 3ce3dca56d
Image package to append layers and push final image 2018-02-28 12:05:42 -08:00
Priya Wadhwa 43bad54292
Added snapshot package and tests 2018-02-28 11:05:57 -08:00
Priya Wadhwa f68fa5fa97
Changed /work-dir and /dockerfile to /workspace 2018-02-28 09:44:22 -08:00
Priya Wadhwa 9544c0bf53
Added logging statements 2018-02-21 11:30:02 -08:00
Priya Wadhwa 093dfd04df
Unpack filesystem and whitelist from /proc/self/mountinfo 2018-02-21 11:02:30 -08:00
Priya Wadhwa c284f25441 Added CLI flags and set logs 2018-02-20 20:50:03 -08:00