Commit Graph

1196 Commits

Author SHA1 Message Date
Wietse Muizelaar 05a316c26c Change loglevel for extractedFiles to debug. Fixes https://github.com/GoogleContainerTools/kaniko/issues/901 2020-01-23 21:37:06 +01:00
Tejal Desai 3e5d0a6334 add unit tests 2020-01-23 11:12:54 -08:00
Sam Stoelinga 509afaf112 Fixes #988 run_in_docker.sh only works with gcr.io 2020-01-22 17:03:43 -08:00
Tejal Desai 79d226ade0 refactor 2020-01-22 16:32:46 -08:00
Tejal Desai bb129e9c88 code review comments 2020-01-22 16:27:06 -08:00
Tejal Desai b271eb8ab9 fix linter 2020-01-22 15:39:03 -08:00
Tejal Desai 478205e5ca fix adding symlinks to FS which do not exists 2020-01-22 15:27:01 -08:00
Tejal Desai f1f7297478 fix tests 2020-01-22 11:47:10 -08:00
Tejal Desai da7e9928e4 Fix Symlinks not being copies across stages 2020-01-22 11:47:10 -08:00
Tejal Desai 6e80e627ac
Merge pull request #979 from samos123/travis-ci-integration-testv2
Run integration tests in Travis CI
2020-01-22 09:55:02 -08:00
Tejal Desai 6a6c547811
Merge pull request #980 from PhoenixMage/PR646_rebase_fix
Prefer platform that is currently running for pulling remote images and kaniko binary Makefile target
2020-01-21 16:26:00 -08:00
Tejal Desai 76f0bf44e5 fix hack linter 2020-01-21 15:22:49 -08:00
Tejal Desai d362359314
Merge pull request #981 from cvgw/u/cgwippern/fix-issue-940
Fix #940 set modtime when extracting
2020-01-21 09:59:22 -08:00
Tejal Desai 649a0ed99b
Merge pull request #983 from cvgw/u/cvgw/fix-issue-519
Fix #519 capital letter in stage names
2020-01-21 09:56:06 -08:00
Tejal Desai b1970a3584
Merge pull request #792 from loganprice/FixAddTar
Fix Ability for ADD to unTar a file
2020-01-21 09:55:25 -08:00
Cole Wippern b9b61e2a12
Merge pull request #943 from shortstories/bugfix/copy-with-symlink
Fix #942 COPY or ADD to symlink destination breaks image
2020-01-20 20:55:35 -08:00
ohchang-kwon df767bb195 apply code review results 2020-01-21 12:07:13 +09:00
cvgw e652f815ef Fix #519 capital letter in stage names
update stage code so that when comparing the BaseName of
a stage against the recorded, lowercase version of a Stage name
the BaseName is also lowercased.
2020-01-20 15:57:05 -08:00
Cole Wippern 4e8bdb3947 Fix #940 set modtime when extracting
Certain utilities like Apt depend on modtime
for certain files. Kaniko was not setting modtime when
extracting files and so this broke things like apt.

Kaniko now sets the file mod time to the value from the tar
header.
2020-01-20 09:11:44 -08:00
Sam Stoelinga 61af994a33 Run integration tests in Travis CI
- Change integration tests to use docker hub instead of GCR due to bug
in library that requires authentication with gcr.io even for public
images. See #966 for bug tracking this.
- Make uploading to GCS bucket configurable through a flag --uploadToGCS
- Utilize a locally deployed docker registry in travis CI to remove
dependency of needing to authenticate with GCP. This requires host
networking such that we can access the registry on localhost:5000
- Use the commit that's being tested for `TestGitBuildcontext`
- Remove duplicate GitBuildContext case that's now covered by default in
travis CI.
2020-01-19 22:33:04 -08:00
Anthony Davies ed22afc19b Rebase fix for PR #646
I needed this for my arm64 k8s cluster. I have zero Go experience but
enough experience with other things to fix the rebase (I think!). This
patch is working fine on my cluster.
2020-01-20 13:43:45 +11:00
Yoan Blanc e26bd672f1
fixup! Merge remote-tracking branch 'origin/master' into registry-mirror
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-01-18 09:36:22 +01:00
Yoan Blanc 140879fadd
Merge remote-tracking branch 'origin/master' into registry-mirror 2020-01-18 09:35:56 +01:00
Cole Wippern 96093359c1 rename mock pkg for lint 2020-01-17 14:59:14 -08:00
Cole Wippern f96ea3bbfb hand edit mock license
for some reason hack/boilerplate.sh failed after using `addlicense`
so I copy/pasted the license header from another file
2020-01-17 14:56:12 -08:00
Cole Wippern a9896d5c43 update mocks with license 2020-01-17 14:32:36 -08:00
Cole Wippern 274f21857c update vendor 2020-01-17 14:28:17 -08:00
Cole Wippern 876f24b0c9 update caching run and copy extracted files
Update caching run and copy commands to use the new
GetFSFromLayers method and include the whiteout option so that
whiteout files are extracted and included in extractedFiles
2020-01-17 14:19:58 -08:00
Cole Wippern 71aed35094 GetFSFromLayers
* add util.GetFSFromLayers
* GetFSFromImage delegates to GetFSFromLayers
* add FSOpts and FSConfig for GetFSFromLayers
* add tests for GetFSFromLayers
* add gomock for test support
* add mock_v1 for layers
2020-01-17 13:36:23 -08:00
Cole Wippern 00a01f9f29
Merge pull request #972 from tejal29/release
release v0.16.0
2020-01-17 12:39:27 -08:00
Tejal Desai 37ce306aca release v0.16.0 2020-01-17 10:46:16 -08:00
Cole Wippern e19cc228ba
Merge pull request #941 from stijndehaes/feature/cache-warmer-private-reg-support
Support for private registries in the cache warmer
2020-01-17 08:38:59 -08:00
Tejal Desai a6add78a97 do not use the git repo as context 2020-01-16 23:08:22 -08:00
Tejal Desai 20604dff3d
fix integration test 2020-01-16 22:12:35 -08:00
Tejal Desai 2a4cb90ea1
remove registry name from dockerfile
Rename dockerfile 
Revert registry name change
2020-01-16 22:09:50 -08:00
Tejal Desai f721212ded
fix base image link. 2020-01-16 22:01:47 -08:00
Tejal Desai e702d75e9c
Merge pull request #964 from samos123/fix-argsescape
Fix bug with docker compatibility ArgsEscaped
2020-01-16 16:13:57 -08:00
Tejal Desai 727567cb33
Fix steps to run individual integration test 2020-01-16 15:40:01 -08:00
Stijn De Haes 3fa8f686db Support for private registries in the cache warmer
Closes #503

Signed-off-by: Stijn De Haes <stijndehaes@gmail.com>
2020-01-15 15:35:42 +01:00
Tejal Desai b5c3d95d8e
Merge pull request #967 from lou-lan/fix/clean-code
Clean code (Condition is always 'false' because 'err' is always 'nil' ).
2020-01-14 13:26:10 -08:00
lou-lan da0e7c7bdc Clean code (Condition is always 'false' because 'err' is always 'nil' ). 2020-01-14 15:11:22 +08:00
Sam Stoelinga 64bfc3eabb Fix bug with docker compatibility
ArgsEscaped according to Docker docs should only be set in Windows
environments: https://docs.docker.com/engine/api/v1.30/

It was causing integration test to fail with following message:
```
FAIL: TestRun/test_Dockerfile_test_metadata (8.48s)
           "Diff": {
             "Adds": [
               "ArgsEscaped: true"
             ],
             "Dels": [
               "ArgsEscaped: false"
             ]
```

However docker 18.xx returns ArgsEscaped: true
whereas docker 19.xx returns ArgsEscaped: false
Hence this patch also adds the docker version check to the integration
to ignore ArgsEscaped being different when 18.xx is used.
2020-01-13 21:18:54 -08:00
Tejal Desai aecc915e03
Merge pull request #961 from cvgw/u/cgwippern/fix-647_copy_dir_permissions
Fix #647 Copy dir permissions
2020-01-13 10:19:06 -08:00
Tejal Desai 4b80314e92
Merge pull request #965 from samos123/integration-tests-with-service-account
Allow setting serviceAccount in integration test
2020-01-13 10:18:33 -08:00
Sam Stoelinga 8cf392e20e Allow setting serviceAccount in integration test
Previously it would mount .config/gcloud directory which is not
recommended for systems such as CI that authenticate with Google Cloud.
This commit allows you to set the path to a service account.

By default previous behaviour will be as before so this shouldn't break
existing systems that run the integration test.
2020-01-12 18:54:50 -08:00
Cole Wippern 464ac134f5
Merge pull request #927 from cvgw/u/cgwippern/issue-926_fix_cache_warmer_and_method_sig
Fix #926 cache warmer and method signature
2020-01-10 13:10:51 -08:00
Cole Wippern e2d1cbfe71 Fix #647 Copy dir permissions
* update otiai10 to latest version which has correct permission logic
2020-01-10 13:07:50 -08:00
Cole Wippern 776fa43eb2 refactor cache.Warm and add tests 2020-01-10 12:29:17 -08:00
Cole Wippern b1b0513c05 Fix #926 cache warmer and method signature 2020-01-10 12:29:16 -08:00
Tejal Desai 48f66e958c
Merge pull request #949 from cvgw/u/cvgw/fix_948_update_valid_copyright_years
Fix #948 update valid license years
2020-01-10 11:57:01 -08:00