Commit Graph

1026 Commits

Author SHA1 Message Date
Ben Einaudi 03b8922ede Upgrade dependency to go-containerregistry third-party library
By doing so it will fix issues met when mixing source/remote registry

Close #808
2020-01-26 18:55:52 +01:00
Tejal Desai e8fffda7cb
Merge pull request #995 from tejal29/507
Fix home and group set for user command
2020-01-24 22:18:09 -08:00
Tejal Desai 68e8c6e902
Merge pull request #975 from cvgw/u/cgwippern/fix-issue-506
Fix #506 add option additional-whitelist
2020-01-24 16:11:32 -08:00
Tejal Desai 308137f46d
Merge pull request #994 from wmuizelaar/fix_extracted_verbose_logging
Change loglevel for extractedFiles to debug. Fixes #901
2020-01-24 14:04:50 -08:00
cvgw ac8e123815 additional-whitelist
* update readme
* improve test
* change default
2020-01-24 10:22:20 -08:00
Cole Wippern 72bfed1850 add option additonal-whitelist
Add a new option additonal-whitelist which defaults
to a single entry, "/var/run". This will allow users to
remove "/var/run" from the whitelist or retain the current
behavior with no change.
2020-01-23 16:50:33 -08:00
Tejal Desai 048de00c33 Fix home and group set for user command 2020-01-23 15:07:15 -08:00
Cole Wippern a2aae6274d
Merge pull request #973 from cvgw/u/cgwippern/fix-issue-704
Fix issue #704
2020-01-23 13:00:34 -08:00
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 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
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 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
Cole Wippern f6dcdb7f4b
Merge pull request #954 from amouat/master
Move hash bang to first line.
2020-01-10 11:15:12 -08:00
Cole Wippern 8804f36cbf
Merge pull request #945 from noni73/patch-1
Fix #944 include docker-credential-acr-linux
2020-01-10 10:06:51 -08:00
Tejal Desai ac8626c0ac
Merge pull request #955 from samos123/integration-testing-1.13
Fixes #950 integration test failing on go 1.13
2020-01-07 21:38:12 -08:00
Sam Stoelinga fa94f6b942 Fix #950 integration test failing on go 1.13
From Golang 1.13 release notes:
Testing flags are now registered in the new Init function, which is
invoked by the generated main function for the test. As a result,
testing flags are now only registered when running a test binary, and
packages that call flag.Parse during package initialization may cause
tests to fail.
2020-01-07 09:46:25 -08:00
Adrian Mouat 6c7449421b Fix more hash bang lines.
Fixes #953.
2020-01-07 12:13:24 +00:00
Adrian Mouat 9b629ac8c7 Move hash bang to first line.
For hash bang statements to take effect, they must be the first line
in a script.

Fixes #953.
2020-01-07 12:05:20 +00:00