Commit Graph

947 Commits

Author SHA1 Message Date
Andrei Kvapil 7065921aa4
Fix copying ownership (#1725)
* fix uid, gid overriding

* fix ownership for staging building

* add integration test

* add check for ignored files

* improve errors
2021-12-23 13:25:55 -05:00
Lars Seipel ac1a703731
Fix possible nil pointer derefence in fs_util.go (#1813)
When os.Stat returns an error different from ErrNotExist,
mkdirAllWithPermissions may panic with a nil pointer
derefence due to insufficient error checking.

Avoid the panic by bailing out, returning the error to the
caller.
2021-12-23 11:37:27 -05:00
ygelfand b3ec974cfc
include auth when fetching specific specs (#1796)
Signed-off-by: ygelfand <yuri@shlitz.com>
2021-12-23 11:36:19 -05:00
Travis DePrato ee95be1e27
Use pax tar format (#1809)
* Use PAX tar format

* Add test case
2021-12-23 11:35:00 -05:00
François JACQUES 5c81fa5774
Fixes #1837 : keep file capabilities on archival (#1838)
Signed-off-by: JACQUES Francois <hypnoce@donarproject.org>
2021-12-22 20:05:39 -05:00
Tejal Desai ee31dc93b6
Revert "Support mirror registries with path component (#1707)" (#1794)
* Revert "Support mirror registries with path component (#1707)"

This reverts commit 4e218f2162.

* fix tests and add co-sign back
2021-10-20 19:13:24 -07:00
wwade 82fc94d930
git: accept explicit commit hash for git context (#1765)
* git: accept explicit commit hash for git context

When checking out code from non-github repositories, the typical
assumptions may not be valid, e.g. that the only interesting
non-branch commits have ref names starting with refs/pull. A specific
example is fetching an un-merged commit from a gerrit repository by
commit hash.

This change just looks at the second part of the git context path and
checks if it's a SHA commit hash, and if so, will fetch and check out
this commit after cloning the repository.

Sample context argument:

    https://github.repo/project#e1772f228e06d15facdf175e5385e265b57068c0

* ci: fix test script to recognize any non-zero exit as an error

hack/linter.sh didn't properly install golangci-lint in hack/bin as I
already have another version of golangci-lint on my PATH, but then it
failed to execute because it was looking for it specifically in
hack/bin.

When the executable is not found, the exit code is 127 instead of 1,
and so test.sh ignored the error.

Two fixes:

1. `test.sh`:
  - Use `if (script) ...` instead of assigning / checking a result
    variable to determine if each validation script passed or failed.

2. `hack/linter.sh`:
  - Instead of checking for golangci-lint on the path, just
    specifically check for an executable file (`test -x`) in the
    expected location.

Co-authored-by: Wade Carpenter <wwade@users.noreply.github.com>
2021-10-19 19:27:15 -07:00
Tejal Desai cf4822c31c
Run docker_credentials_gcr in warmer (#1780)
* run docker_credentials_gcr in warmer

* fix tests

* fix dockerfiles

* fix boilerplate

* mend

* fix

* another lint
2021-10-19 12:25:42 -07:00
Janosch Maier 46e01340c2
Remove tarball.WithCompressedCaching flag to resolve OOM Killed error (#1722)
* Remove tarball.WithCompressedCaching flag to resolve OOM Killed error

Large images cannot be build as the kaniko container will be killed due to an OOM error. Removing the tarball compression drastically reduces the memory required to push large image layers. Fixes #1680

This change may increase the build time for smaller images. Therefore a command line option to trigger the compression or a more intelligent behaviour may be useful.

* Add new command line flag to toggle compressed caching

* Add unittest for build with --compressed-caching command line flag set to false
2021-10-19 00:14:06 -07:00
Gilbert Gilb's a42adb9bb4
Fix composite cache key for multi-stage copy command (#1735)
* chore: add workflows for pr tests

* fix unit tests

* fix formatting

* chore: fix gobuild

* change minikube script

* chore: fix lint install script

* chore: ignore and fix tests

* fix lint and run gofmt

* lint fixes

* k8s executor image only

* fix Makefile

* fix travis env variables

* more info on k8s tests

* fix travis run

* fix

* fix

* fix

* fix log

* some more changes

* increase timeout

* delete travis.yml and fix multiple copy tests

* fix registry mirror

* fix lint

* add concurency

* last attemot to fix k8 integrations

* diff id for diff workflows

* Fix composite cache key for multi-stage copy command (#1706)

PR #1518 reintroduced COPY layers caching using the `--cache-copy-layers`
flag. Unfortunately, this PR also introduced a bug by not including the
stage digest into the caching key of the COPY command when the
`--cache-copy-layers` flag was not set. As a result, kaniko would use
any previous (possibly stalled) layer from the cache because the digest
of the "COPY --from" command would never change.

PR author probably expected Go to fallthrough in the switch just like C
does. However, this is not the case. Go does not fallthrough in
switch-statements by default and requires the fallthrough keyword to be
used. Note that this keyword is not available in type-switches though,
because it wouldn't work properly with typings.

* refactor: add an abstract copy command interface to avoid code duplication

* fix typo in error message

Co-authored-by: Tejal Desai <tejal29@gmail.com>
2021-10-18 23:31:01 -07:00
Tejal Desai 1da17b6e9b
chore: add workflows for pr tests (#1766)
* chore: add workflows for pr tests

* fix unit tests

* fix formatting

* chore: fix gobuild

* change minikube script

* chore: fix lint install script

* chore: ignore and fix tests

* fix lint and run gofmt

* lint fixes

* k8s executor image only

* fix Makefile

* fix travis env variables

* more info on k8s tests

* fix travis run

* fix

* fix

* fix

* fix log

* some more changes

* increase timeout

* delete travis.yml and fix multiple copy tests

* fix registry mirror

* fix lint

* add concurency

* last attemot to fix k8 integrations

* diff id for diff workflows
2021-10-18 23:22:44 -07:00
Rhianna b525d1e27b
Support force-building metadata layers into snapshot (#1731)
* feat: add support for forcing build metadata

* Chore: Added snapshot forceBuildMetadata flag tests.
2021-10-18 11:43:51 -07:00
Jason Hall 4e218f2162
Support mirror registries with path component (#1707) 2021-08-10 22:06:51 -07:00
nihilo 682191f523
Bugfix/trailing path separator (#1683)
* Test_EnvReplacement: env of path ends in a slash

* Fix trailing path separator
2021-07-08 12:06:52 -07:00
Silvano Cirujano Cuesta 1d9bc175c2
Add support for CPU variants (#1676)
Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
Inspired-by: mickkael 19755421+mickkael@users.noreply.github.com
2021-07-08 12:05:38 -07:00
Jose Donizetti 5b3fb84a22
Retry extracting filesystem from image (#1685)
* Retry extracting filesystem from image

* Add flag image-fs-extract-retry

* Add --image-fs-extract-retry documentation
2021-07-08 12:00:22 -07:00
Tejal Desai 094fe52b37
Revert "save snaphots to tmp dir (#1662)" (#1670)
This reverts commit 754253d375.
2021-06-14 12:09:07 -07:00
Patrick Barker 754253d375
save snaphots to tmp dir (#1662) 2021-06-14 12:08:47 -07:00
Max Walther 1ee4140024
Try to warm all images and warn about errors (#1653)
When providing multiple images to warm, the warmer stops at the first error.
There are use cases however where an image is provided to the warmer which does not yet exist on purpose (e.g. CI/CD latest image only created at first release).
Thus we want to try all given images and only error if none of them work.
2021-06-04 10:07:57 -07:00
Kamal Nasser f21639daac
Fix snapshotter ignore list; do not attempt to delete whiteouts of ignored paths (#1652)
* avoid deleting whiteouts if they are in ignore list

* fix snapshotter ignore list

* include filesystem mounts in ignorelist of snapshotter
* clean up ignore list logic

* add unit and integration tests for #1652

* fix tests and ignore list updates
2021-06-04 10:07:24 -07:00
Colin b33f9655eb
Support warming images by digest (#1629) 2021-04-22 11:51:33 -07:00
Vivek Kumar 6028f1c5ec
fix: create parent directories before writing digest files (#1612) 2021-04-13 14:41:54 -07:00
Jon Friesen d40a51f38f
adds ignore-path command arguments to executor (#1622)
* adds ignore-path command

* add flag to README
2021-04-13 14:29:51 -07:00
Lars Gröber 0477900feb
Fixes #1544 (#1597)
* Specifying a tarPath will push the image as well
2021-03-31 10:17:26 -07:00
Sascha Schwarze 69f942f751
Improve retry behavior for push operation (#1578)
* Update go-containerregistry to 0.4

* Implement --push-retry argument
2021-02-22 21:25:58 -08:00
Sascha Schwarze 0ef53aa1d3
Optimize access to image manifests (#1555)
Introduce an in-memory cache for retrieved manifests in remote.go
2021-01-28 11:10:13 -08:00
Theofilos Papapanagiotou 24fd3b2ab0
Fetch a github pull request (#1543) 2021-01-22 11:43:39 -08:00
Or Geva b3e036aab2
Add --image-name-tag-with-digest flag (#1541) 2021-01-19 13:28:05 -08:00
Josh Chorlton ece215c181
reject tarball writes with no destinations (#1534)
* reject tarball writes with no destinations

* Update pkg/snapshot/snapshot.go

Co-authored-by: Tejal Desai <tejal29@gmail.com>
2021-01-03 10:13:05 -08:00
Tejal Desai 86e361c20e
Update fs_util.go 2020-12-22 00:16:54 -08:00
Tejal Desai 9f76932171
Update GowalkDir dependency to pick up fixes. Added default 90 min timeout for walking FS. Override it with environment variable. Add slowjam to kaniko pod (#1530) 2020-12-21 22:40:37 -08:00
Matt Moore 1ad4295462
Update ggcr to pick up estargz and caching option (#1527) 2020-12-21 10:09:21 -08:00
Tejal Desai b04399eeac
add caching copy layers back (#1518)
* add caching copy layers back

* fix test

* lint

* fix test - 2

* Add integration test

* fix lint
2020-12-11 00:25:03 -08:00
Vincent Behar dde98a8e73
feat(warmer): Warmer now supports all registry-related flags (#1499)
which means we can now:
- set up one or more mirrors
- set up registries certificates
- skip TLS verify
- use plain HTTP
using the same set of flags that are defined for the executor
2020-12-10 22:55:43 -08:00
Fabrice 454910f613
feat: Add https tar.gz remote source for context (#1519)
* feat: Add https tar.gz remote source for context

* Add license header

* add license header

Co-authored-by: Tejal Desai <tejal29@gmail.com>
2020-12-10 22:55:02 -08:00
Severin Strobl c2a919a801
Switch to runtime detection via bpfd/proc (#1502)
The upstream of github.com/genuinetools/amicontained switched to the
container runtime detection via github.com/genuinetools/bpfd/proc,
which supports a larger range of container runtimes. With this change
(among others) Podman can be detected correctly.

Fixes #1501.
2020-12-09 11:44:31 -08:00
Lars c982956c15
Fix typo in error message (#1494) 2020-12-08 16:18:11 -08:00
Vincent Behar 131828a1ad
feat: support multiple registry mirrors with fallback (#1498)
Fixes #1473

The initial implementation of the registry mirror only allowed a single mirror, and if pulling from the mirror failed, the build would fail.

This change introduces:
- multiple registry mirrors instead of a single one
- fallback if an image can't be pulled from a registry

This is the same behavior as the docker daemon and will allow using a registry mirror such as `mirror.gcr.io` which is incomplete and doesn't have all the content that the default registry on docker.io has.

Note that there are no changes in the CLI flags, the `--registry-mirror` flag is still valid. But now it can be used multiple times to set up more than one registry mirror.

Co-authored-by: Tejal Desai <tejaldesai@google.com>
2020-12-08 16:16:25 -08:00
Sladyn 0c1a1a690a
Fix COPY with --chown command (#1477)
* Fix COPY with --chown command

* fix linters
2020-12-08 16:12:04 -08:00
Lars bdcdec7c93
Remove unused code (#1495) 2020-12-08 16:11:42 -08:00
mickkael 275cc9a7e7
Add option customPlatform (#1500)
* Add option customPlatform

* fix formatting

* fix No newline at end of file
2020-12-08 16:11:18 -08:00
Shashank 9ed158c1f6
Fixes #1469 : Remove file that matches with the directory path (#1478)
* Fixes #1469 : Remove file that matches with the directory path

* Fixes #1469 : Remove file that matches with the directory path

* Fixes #1469 : Fix lint errors

* Fixes #1469 : Fix lint errors

* Fixes #1469 : Fix lint errors

* Fixes #1469 : Reduce conditional depth

* Fixes #1469 : Remove an additional line

Co-authored-by: anugu-chegg <anugu.s@chegg.com>
2020-11-05 08:48:55 -08:00
ejose19 2f8d939b3f
fix: CheckPushPermissions not being called when CacheRepo was set (#1471) 2020-10-29 23:46:00 -07:00
Tinjo Schöni 5f4e2f1366
Fix .dockerignore for build context copies in later stages (#1447)
* Extend .dockerignore integration test with copies in later stages

.dockerignore should continue to apply when copying from the build context in later stages, but it currently doesn't

* Replace excluded global with passed along FileContext struct

This new FileContext struct allows much cleaner handling of context specific file exclusions.
The global excluded file state is no longer needed.

Additionally this also fixes the issue where excluded files aren't being applied for build context copies in later build stages.
2020-10-08 12:47:14 -07:00
ejose19 0ef3a6b525
Fix permissions on cache when --no-push is set (#1445) 2020-10-02 10:11:12 -07:00
Ian Kerins 1240333657
Stop caching COPY layers (#1408)
Cached COPY layers are expensive in that they both need to be retrieved
over the network and occupy space in the layer cache.

They are unnecessary in that we already have all resources needed to
execute the COPY locally, and doing so is a trivial file-system
operation.  This is in contrast to RUN layers, which can do
arbitrary and unbounded work.

The end result is that cached COPY commands were more expensive when
cached, not less.  Remove them.

Resolves #1357
2020-09-30 17:18:50 -07:00
Tejal Desai 357286fa4b
add tests (#1426) 2020-09-30 16:46:22 -07:00
Akram Ben Aissi ab768b5d26
Allow DOCKER_CONFIG to be a filename (#1409)
* Allow DOCKER_CONFIG to be a filename

* UnitTest: DockerConfLocation must return a file if it is existent and passed using env, or default if the file is incorrect
2020-09-30 16:45:34 -07:00
Tejal Desai 0c386e3f4a
fix docker-credential-gcr helper being called for multiple registries (#1439)
* fix multiple registryies docker-credential-gcr

* Update pkg/executor/push.go
2020-09-30 16:43:16 -07:00
Tejal Desai 1990cb76e9 change repo string to just string 2020-09-09 09:09:19 -07:00
Joe Kutner 0a0b4f1583
Add func to append to ignorelist.
This allows those using Kaniko as a library to add ignored dirs and
files without needs to modify /proc/self/mountinfo or doing other
strange things with mount -t tmpfs
2020-08-26 08:30:42 -05:00
Tejal Desai 0c7e1644cb
Merge pull request #1322 from caarlos0/opts
feat: new git flags
2020-08-13 15:08:36 -07:00
Tejal Desai df7f4cc9dc add boilerplate 2020-08-13 14:44:07 -07:00
Tejal Desai bfd92b5c6b
Merge pull request #1342 from aca/fix
Set correct PATH for exec form
2020-08-13 14:20:04 -07:00
Tejal Desai 94b2b6b391 gofmt 2020-08-13 14:03:38 -07:00
Tejal Desai abcc16b4cc fix gofmt 2020-08-13 13:59:58 -07:00
Tejal Desai 11024f258d new implementation for run 2020-08-13 13:43:07 -07:00
Tejal Desai 472376307e
Update run.go 2020-08-13 13:17:42 -07:00
Tejal Desai 8f1528764f
add defer. 2020-08-13 10:47:35 -07:00
Tejal Desai 1f456866eb
Merge branch 'master' into opts 2020-08-13 10:43:14 -07:00
Tejal Desai 1bf66ef435
Merge pull request #1153 from why-xn/master
Checkout a specific git commit
2020-08-13 10:41:26 -07:00
Tejal Desai d83338e372
Merge pull request #1318 from caarlos0/git
feat: accept GIT_TOKEN
2020-08-13 10:40:07 -07:00
Tejal Desai 28a38ea4c2
Merge pull request #1374 from tsufeki/current-platform-in-warmer
Use current platform when fetching image in warmer
2020-08-13 10:36:58 -07:00
Tejal Desai 4ec9f206c8
Merge pull request #1379 from tejal29/fix_use_new_run
fix use new run marker
2020-08-13 09:46:20 -07:00
Tejal Desai 9a12c6f88e gofmt 2020-08-12 18:54:53 -07:00
Tejal Desai a8bef58fa5
Merge branch 'master' into opts 2020-08-12 16:55:51 -07:00
Tejal Desai 553933514a fix use new run marker 2020-08-12 16:06:19 -07:00
tsufeki 4af795bf4a Use current platform when fetching image in warmer
Cache warming fetched images without specifying platform, which resulted
in always pulling default linux/amd64. Even when kaniko was built and
run on arm64.

This change brings warmer's behaviour in line with executor's by
specifying runtime.GOOS/GOARCH.

Fixes #1372
2020-08-07 15:52:15 +02:00
Carlos Alexandro Becker 008f8e890c fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-07-29 23:32:40 -03:00
Carlos Alexandro Becker fdcc40683e fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-07-29 23:26:08 -03:00
Carlos Alexandro Becker ed04106af4 Merge remote-tracking branch 'upstream/master' into git 2020-07-29 23:24:17 -03:00
Tejal Desai a47a78edae
Merge pull request #1319 from caarlos0/go-git
feat: upgrade go-git
2020-07-28 21:32:16 -07:00
Tejal Desai 92917bab3a
Merge pull request #1326 from greut/add-to-err-on-404
add should fail on 40x
2020-07-28 21:30:29 -07:00
Tejal Desai 2427b348ac
Merge pull request #1350 from hlubek/bugfix-reproducible-whiteout
Bugfix: Reproducible layers with whiteout
2020-07-28 14:57:28 -07:00
Tejal Desai 46f270bbd4
Merge pull request #1264 from greut/fix/1172
pkg: prepend library when using registry mirror
2020-07-28 14:55:36 -07:00
Joe Kutner 29a02b08ff
Move snapshotPathPrefix into a method
This allows the value to be determined on the fly, which supports consumers that use Kaniko snaphot as a library and may need to change the value of config.KanikoDir
2020-07-26 21:46:33 -05:00
Christopher Hlubek 5c61bc44bd Remove unreliable unit test for SnasphotFS with whiteout 2020-07-20 11:35:25 +02:00
Christopher Hlubek 699a4bee32 Bugfix: Reproducible layers with whiteout
When deleting files of previous layers, the whiteout files
were not added to the tar file in a consistent order.

This change adds a stable sorting to the whiteout files and
adds unit tests to check for stable sorting.
2020-07-16 10:56:59 +02:00
aca dd4191ad3d gofmt 2020-07-04 03:46:41 +09:00
aca 966cd03499 Set correct PATH for exec form
Fixes #1304
2020-07-04 01:16:05 +09:00
Carlos Alexandro Becker e483bee97c
feat: git options
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-06-24 15:31:32 -03:00
Carlos Alexandro Becker f744acfbb7
Merge remote-tracking branch 'upstream/master' into opts
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-06-24 15:10:05 -03:00
Tejal Desai cdbd8af057
Merge pull request #1328 from jonjohnsonjr/artifact-registry
Add pkg.dev to automagic config file population
2020-06-23 14:55:04 -07:00
Jon Johnson c42881410c Add pkg.dev to automagic config file population
Kaniko currently does config file setup for GCR such that pushing to GCR
automagically works. This change does the same for pkg.dev:
https://cloud.google.com/artifact-registry

This also tightens up the hostname check to ensure we don't send
credentials to a registry that happens to contain "gcr.io".
2020-06-23 11:23:07 -07:00
Yoan Blanc 999365f5f9
fixup! fixup! add should fail on 40x
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-06-20 10:42:59 +02:00
Yoan Blanc ca23ae441e
add should fail on 40x
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-06-20 09:49:11 +02:00
Carlos Alexandro Becker 57c2df4d97
feat: new git flags
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-06-15 17:24:04 -03:00
Carlos Alexandro Becker ab42a919a5
feat: recurse submodules
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-06-15 12:01:25 -03:00
Carlos Alexandro Becker 7b8879c03f
feat: upgrade go-git
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-06-15 11:58:04 -03:00
Carlos Alexandro Becker 13e6bdf533
fix: improve tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-06-15 11:20:27 -03:00
Carlos Alexandro Becker 8322cbe3b6
feat: accept GIT_TOKEN
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-06-15 11:16:50 -03:00
Tejal Desai 98a2ee2e34 intoduce delay 2020-06-06 20:52:58 -07:00
Tejal Desai 07cdfcf091 fix tests 2020-06-06 20:28:04 -07:00
Tejal Desai 4ac51ef515 merge 2020-06-06 20:17:17 -07:00
Tejal Desai c85d64c8ae better shdTakeSnapshot 2020-06-06 19:49:34 -07:00
Tejal Desai 1033ad789b
Merge pull request #1301 from tejal29/addRedoSnapshotter
Add redo snapshotter.
2020-06-06 16:48:30 -07:00
Tejal Desai 8d3bbd20f4 initialize 2020-06-06 15:50:24 -07:00
Tejal Desai 988114d022 re-use cache when checking and adding 2020-06-06 15:27:39 -07:00
Tejal Desai c576771497 fix tests 2020-06-06 11:37:35 -07:00
Tejal Desai b9d25dd5db better whiteout logic 2020-06-06 10:50:24 -07:00
Tejal Desai cbf4452fe9 fix snapshot 2020-06-06 10:03:37 -07:00
Tejal Desai b7462742c1 add deletion logic 2020-06-06 02:05:45 -07:00
Yoan Blanc ce8298bb14
image: add test
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-06-06 10:31:42 +02:00
Tejal Desai ede69f8507 check file changed in loop 2020-06-06 01:24:46 -07:00
Tejal Desai 2a7d33526b lint 2020-06-06 00:30:07 -07:00
Tejal Desai 0f5387960e minimal changes 2020-06-06 00:16:14 -07:00
Tejal Desai 58276274e8 better improvements 2020-06-05 23:44:17 -07:00
Yoan Blanc fcb055e581
Merge remote-tracking branch 'origin/master' into fix/1172 2020-06-06 08:42:30 +02:00
Tejal Desai 43338d4b2f add a new run command along with a new flag 2020-06-05 19:53:16 -07:00
Tejal Desai 6ab97e2b5f ADD GCB benchmark code 2020-06-05 12:46:47 -07:00
Tejal Desai bea020f34f add another snapshotter 2020-06-05 02:54:32 -07:00
Tejal Desai ec3ca84ad9 add another redo snapshotter 2020-06-04 22:02:13 -07:00
Tejal Desai 86d77d8800
Merge pull request #1283 from tejal29/fix_looping
[Perf] Reduce loops over files when taking FS snapshot.
2020-06-04 14:30:53 -07:00
Tejal Desai 2303e47aad
Merge pull request #1260 from ljakimczuk/master
Resolving nested meta ARGs
2020-06-04 13:24:34 -07:00
Tejal Desai 9c68c9a36c Merge branch 'master' into fix_looping 2020-06-04 13:18:30 -07:00
Tejal Desai 8a585829b8
Update pkg/dockerfile/dockerfile_test.go 2020-06-04 12:28:51 -07:00
Tejal Desai 994a412d0b some more renames 2020-06-02 16:08:46 -07:00
Tejal Desai cbf3073fda rename whitelist to ignorelist 2020-06-02 15:56:27 -07:00
Yoan Blanc af14ef2c8d
Merge remote-tracking branch 'origin/master' into fix/1172 2020-05-25 13:54:37 +02:00
Tejal Desai e0f93578b6
Merge pull request #1284 from tejal29/add_timings
add timings for resolving paths
2020-05-23 15:37:58 -07:00
Tejal Desai dcea89c317 rm file 2020-05-23 15:27:37 -07:00
Tejal Desai 41bc04dc12 add timings for resolving pahts 2020-05-23 14:29:46 -07:00
Tejal Desai 503aad17b7 Fix looping through files twice 2020-05-23 14:24:07 -07:00
Ben Einaudi 2f6090dcd7 Remove use of DefaultTransport
Using DefaultTransport and manipulating its tls configuration may lead to unexpected behaviour
2020-05-20 11:43:13 +02:00
Tejal Desai 31feaa4c12
Merge pull request #1263 from yorinasub17/git-auth-token-env
Add ability to set git auth token using environment variables
2020-05-20 00:59:14 -07:00
Tejal Desai 3f3c19a545
Merge pull request #1234 from tejal29/fix_copy_from
Apply dockefile exclude only for first stage
2020-05-19 15:40:51 -07:00
Tejal Desai 1d11b40052
Merge pull request #1253 from tejal29/fix_non
fix switching to non existent workdir
2020-05-19 15:39:08 -07:00
Tejal Desai da5c420ee9 use a mock 2020-05-19 15:05:46 -07:00
Yoan Blanc fef4bb55b7
image: prepend library/ when using registry
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-05-12 14:46:25 +02:00
Yoriyasu Yano 6e615a8ff9 Add ability to set git auth token using environment variables
Currently the only way to set the git auth is by including it in the context
git URL. This can be problematic for certain environments such as ECS where the
command args for are stored in logs. Introduces updates to allow setting the
authentication info using the environment variables `GIT_USERNAME` and
`GIT_PASSWORD`.
2020-05-11 10:59:48 -05:00
Lukasz Jakimczuk 3dcac1b906 Resolving nested meta ARGs against themselves and build ARGs 2020-05-09 01:23:02 +02:00
Mitchell Friedman 6978fab45c Add retries to image push.
This uses the default provided retry transport by
go-containerregistry as this originally had no retries
built in.

This is useful to avoid intermittent failures of image
registries when returning a retryable status code.
2020-05-08 14:18:43 +01:00
Tejal Desai c271f989f5 fix switching to non existent workdir 2020-05-07 18:59:01 -07:00
Tejal Desai cb11a9982c
Merge pull request #1250 from gliptak/patch-2
Correct typo
2020-05-07 18:27:38 -07:00
Tejal Desai c71deae38c remove dedupes 2020-05-07 16:37:17 -07:00
Gábor Lipták bec0e6a8e3
Correct typo 2020-05-07 16:24:07 -04:00
Tejal Desai d9a6bbe956 add tests 2020-05-06 12:11:03 -07:00
Tejal Desai 23ac909b2d Revert "small perf optimizing. Only remove whiteout path if it needs to be included in the tar"
This reverts commit 67db51810b.
2020-05-06 12:08:44 -07:00
David Dooling 8bfd370ef9
Provide full path to Docker config file
Add tests.  The tests assume a POSIX file system, but it seems many
other tests assume Linux, so perhaps this is not a problem, or at
least does not add a new problem.

Fixes #1235
2020-05-06 10:02:47 -05:00
Tejal Desai 113c2397ea
Update comment. 2020-05-05 22:27:28 -07:00
Tejal Desai 5e275d9824 Apply dockefile exclude only for first stage 2020-05-05 21:45:36 -07:00
David Dooling 0871dfd6ab
Use DOCKER_CONFIG for docker config location
If the DOCKER_CONFIG environment variable is set, use it when
determining if the Docker config file exists.  Fall back to kaniko
default if it the DOCKER_CONFIG environment variable is not set.

Fixes #1228
2020-05-04 16:46:50 -05:00
Tejal Desai b62b3779fe
Merge pull request #1223 from sileht/fix-workdir-relative
feat: ensure relative WorkingDir work
2020-05-04 10:29:51 -07:00
Jordan Goasdoue a9c7839491 fix: stages are now resolved correctly if skip-unused 2020-05-04 18:38:18 +02:00
Mehdi Abaakouk cfc9f39176 feat: ensure relative WorkingDir work
Currently the default WorkingDir in test is "/", while in reallife it's
empty.

This change the tests to reflect reel life and fix the case where
First WorkingDir is relative.
2020-05-04 15:48:39 +02:00
Tejal Desai ae9c9b2813
Merge pull request #1211 from jonhenrik13/log-timestamp-v0.19.0
Add timestamp to logs
2020-05-03 22:41:17 -07:00
Tejal Desai e1c7862911
Merge pull request #1214 from tejal29/experiment
Snapshot FS on first cache miss.
2020-05-03 22:39:25 -07:00
Tejal Desai ee097f9b70 fix unit tests 2020-05-03 22:01:50 -07:00
Tejal Desai e32715ef55
Merge pull request #1164 from tstromberg/add-groups
Add secondary group impersonation w/ !cgo support
2020-05-03 22:00:36 -07:00
Tejal Desai cb14b65e08 fix boilerplate 2020-05-03 21:10:55 -07:00