Commit Graph

1684 Commits

Author SHA1 Message Date
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 63ef549b2c
Merge pull request #265 from nkubala/deps
Update deps
2018-08-01 13:21:34 -07:00
Nick Kubala 32fd56e09f
update go-containerregistry 2018-08-01 13:02:54 -07:00
Nick Kubala e59f05e32f
fix deps 2018-08-01 13:02:54 -07:00
Nick Kubala e45d1f6aac
Update deps 2018-07-31 16:23:23 -07:00
Christie Wilson 5604820c82
Merge pull request #264 from bobcatfish/layer_failure
Add a bit more context to layer offset failures
2018-07-31 15:48:18 -07:00
Christie Wilson 57b1159951 Add a bit more context to layer offset failures
In #251 we are investigating test flakes due to layer offsets not
matching, this change will give us a bit more context so we can be sure
which image has which number of layers, and it will also include the
digest of the image, since kaniko always pushes images to a remote repo,
so if the test fails we can pull the digest and see what is up.

Also updated reproducible Dockerfile to be built with reproducible flag,
which I think was the original intent (without this change, there is no
difference between how `kaniko-dockerfile_test_copy_reproducible` and
`kaniko-dockerfile_test_copy` are built.
2018-07-31 15:33:47 -07:00
priyawadhwa 5db5a7b52e
Release v0.3.0 kaniko (#263) 2018-07-31 11:56:00 -07:00
Christie Wilson 0d7eba9285
Merge pull request #256 from bobcatfish/local_integration_tests
Local integration tests
2018-07-31 10:30:10 -07:00
Christie Wilson b5a4d7636f Pass bucket and repo as args to tests
To allow contributors to run the integration tests with their own GCS
buckets and image repos (since not all contributors will have accesss to
the projects used by the kaniko maintainers) this updates the
integration tests so that these can be provided on the command line.

This allows tests to be run individually, without using `make
integration-test`. Previously, part of the test setup was done
in the shell script (creating the context tarball that is required
for the tests that build images with context). Instead it will be
done in the test iself, so we can use `go test` to run tests
individually if we want to.

If we are running only one individual test, we don't want to build
all of the images, so this commit creates a builder which tracks which
images it has built and can be used by a tests to check if it should
build an image before running, or it will use the images that have
already been built by a previous test.

The name of the context tarball has also been made unique (it includes
the unix timestamp) to avoid potential test flakes if two tests using
the same GCS bucket run simultaneously.
2018-07-31 09:53:59 -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
Balint Pato ba4c7f4b57
Merge pull request #258 from balopat/fix_247_daemons
Kill grandchildren spun up by child processes
2018-07-26 14:49:53 -07:00
balopat 6fe9ea4248 fixes #247 killing grandchildren processes 2018-07-26 13:56:19 -07:00
balopat 8cad6d0082 reproduced 247 with integration test 2018-07-26 11:16:26 -07:00
priyawadhwa ca5069271c
Fully qualify images in dockerfile tests (#257) 2018-07-25 17:56:17 -07:00
John Oss acf0688195 Fix spelling mistake in README (#249) 2018-07-24 10:53:00 -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
Christie Wilson 697ad41bc5 Add logo to README (#236) 2018-07-18 11:44:23 -07:00
Christie Wilson d293df5c47 Add DEVELOPMENT.md (#238)
This commit adds docs aimed at folks interested in ramping up and
contributing to kaniko.

It starts with setting up a github account and forking to make sure the
barrier to entry is as low as possible.
2018-07-18 10:52:37 -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
Jason Hall f2ddefc966 Add Travis CI badge to README.md (#241) 2018-07-18 08:41:47 -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
priyawadhwa a80a7ded35
Update readme (#230)
* update readme

* update readme
2018-07-09 16:51:36 -04:00
priyawadhwa 5f908efbf9
Cut v0.2.0 release (#229) 2018-07-09 15:58:21 -04:00
priyawadhwa dbdf116f8c
make path to Dockerfile an absolute path (#228)
* make path to dockerfile an absolute path

* refactored checking dockerfile path
2018-07-09 14:25:27 -04:00
Shingo Omura 19287f89c5 update go-containerregistry so that kaniko works nicely with Harbor or Gitlab. (#227) 2018-07-06 07:23:44 -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
priyawadhwa 7e437390af
Merge pull request #223 from priyawadhwa/readme
Update readme
2018-07-03 15:40:31 -07:00
Priya Wadhwa 3e7d8b219a update readme 2018-07-03 11:59:14 -07:00
priyawadhwa 81f520812c
Merge pull request #218 from dlorenc/workdir
Set a workdir so paths can be relative to /workspace.
2018-06-26 12:36:49 -07:00
dlorenc cc447088c0
Set a workdir so paths can be relative to /workspace. 2018-06-26 10:54:04 -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
priyawadhwa 0a0c637f34
Merge pull request #215 from priyawadhwa/vendor
update vendored go-containerregistry
2018-06-22 15:08:10 -07:00
Priya Wadhwa 28f3ec30c2
update vendored go-containerregistry 2018-06-22 14:45:46 -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
priyawadhwa 4198901540
Merge pull request #204 from priyawadhwa/snapshot
Add --single-snapshot flag to snapshot once after the build
2018-06-21 17:28:40 -07:00
Priya Wadhwa 2adf82cd66
update integration test 2018-06-21 15:27:05 -07:00
Priya Wadhwa 8453a5bde0
Merge branch 'master' of github.com:GoogleContainerTools/kaniko into snapshot 2018-06-21 14:38:18 -07:00
priyawadhwa 9ad8647d5f
Merge pull request #214 from priyawadhwa/bug
Fix bug in snapshotting
2018-06-21 14:37:33 -07:00
Priya Wadhwa 54282e3e8c
Fix bug in snapshotting 2018-06-21 14:07:59 -07:00
priyawadhwa b7afaf7c7b
Merge pull request #211 from priyawadhwa/bucket
Upload bucket test tarball in integration test
2018-06-21 13:03:28 -07:00
Priya Wadhwa f090b2fe86
upload bucket test tarball in integration test 2018-06-20 10:34:39 -07:00
priyawadhwa 4f4dda0563
Merge pull request #206 from nbyl/distroless-build-fix
fix build of debug image
2018-06-20 09:37:01 -07:00
Nicolas Byl c17b2d5533 fix build of debug image 2018-06-18 23:35:15 +02:00
Priya Wadhwa b09526bc62 added integration test to check layers 2018-06-14 08:44:49 -07:00