kaniko/pkg/commands
Joël Pepper 14ea7c4071
Fix Integration tests (#2425)
* fix(ci): Bump golangci-lint to 1.51.1

* chore(lint): fix gofmt and goimport issues

* chore(lint): fix linter issues

- Adapted error comparison according to linter recommendation
- Disabled noctx linting for http request where canceling makes no sense
- Disabled nilerror linting where nil error is returned on purpose
- Disabled makezero linter where slice is explicitly deepcopied

* chore(ci): Update go version in tests workflows

* fix(ci): Allow boilerplate years from 2000-2099

Previously the regex only allowed the copyright notice to contain the
years 2018,2019,2020,2021, or 2022. This commit widens to regex to
20\d\d allowing any year in the range [2000-2099]

* feat(ci): Replace minikube with k3s for intregration tests

The existing setup for minikube is very complicated, replicating most of
the setup steps for a full kubernetes cluster in an only partially
supported minikube configuration (driver=none). Furthermore the existing
setup has been broken for sometime, likely, at least in part due to the
changes to CNI and CRI in recent kubernetes versions.

Since what we actually need is only a running Kubernetes cluster on the
node and access to a registry on localhost:5000, we can switch the
extremely complicated minikube setup for a lightweight cluster using
k3s. Minikube came with a default addon for running a registry on every
node, but the same is not the case for k3s, instead we make use of the
package helm controller and its HelmChart CR to deploy twuni/docker-registry.helm
and expose it on localhost using the integrated LoadBalancer controller.

* fix(test-684): pin base container version

The dockerfile for the regression test connected to issue 684 used a
rolling tag as base image, making it flaky and fail since it was
introduced.

This commit pins the base image to the digest of bionic-20200219, which,
based on the date of the commit that introduced to the dockerfile would
be the most newest ubuntu build and likely what the "rolling" tag
resolved to back then. Since this also an image from the pre-oci days of
ubuntu, this circumvents a bug in container-diff as well
(https://github.com/GoogleContainerTools/container-diff/issues/389)
2023-03-21 12:30:54 -04:00
..
add.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
arg.go Fix resolving arguments over multi-stage build (#1928) 2022-02-10 09:22:21 -08:00
base_command.go better shdTakeSnapshot 2020-06-06 19:49:34 -07:00
cache.go fmt 2020-04-30 17:07:18 -07:00
cache_test.go remove read succesS 2020-04-30 15:18:39 -07:00
cmd.go Fix bug with docker compatibility 2020-01-13 21:18:54 -08:00
cmd_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
commands.go add cache run command option (#2032) 2022-08-09 08:35:00 -04:00
copy.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
copy_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
entrypoint.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
entrypoint_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
env.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
env_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
expose.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
expose_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
fake_commands.go add unit tests for caching run and copy 2019-12-10 09:29:10 -08:00
healthcheck.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
label.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
label_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
onbuild.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
onbuild_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
run.go add cache run command option (#2032) 2022-08-09 08:35:00 -04:00
run_marker.go add cache run command option (#2032) 2022-08-09 08:35:00 -04:00
run_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
shell.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
shell_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
stopsignal.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
stopsignal_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
user.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
user_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
volume.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
volume_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00
workdir.go fix(WORKDIR): use the config.User for the new dir permissions (#2269) 2022-09-28 21:18:40 -04:00
workdir_test.go Fix Integration tests (#2425) 2023-03-21 12:30:54 -04:00