Changes:
- Update go version to 1.25.3
- Update dependencies to mitigate CVEs
- Fix tests to work with broken APIs after update
- Remove/Replace deprecated methods
- Update Git command to ignore pre-commit hooks
- Update Go builder image to 1.25 in docker files and Openshift CI
- Update tekton pipeline task bundles to have updated golang image
Signed-off-by: Sayan Biswas <sayan-biswas@live.com>
Change details:
Use newer ctor for docker client, the ctor negotiates API so it works
also with older version of daemon. The ability to force API version via
DOCKER_API_VERSION is preserved.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
Whether the base image provides the scripts or not, the repository can supply override scripts.
Removes the expectation/need of a location specified in the image.
Whether the base image provides the scripts or not, the repository can supply override scripts.
Removes the expectation/need of a location specified in the image.
We can simplify the following code
dir, err := os.Open(dirname)
if err != nil {
return err
}
defer dir.Close()
dirs, err := dir.Readdir(-1)
with just `os.ReadDir(dirname)`.
Reference: https://pkg.go.dev/os#ReadDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Add unit tests for pkg/docker.GetAssembleUser(), and tweak its logic so
that it returns the image's default user instead of an empty string when
the image doesn't have a configured assemble user.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The client ContainerCreate() method now takes an optional Platform
argument, but we'll just pass `nil` in for now.
In integration tests, recognize when ContainerWait(WaitConditionNextExit)
timed out because the container had already exited and work around it.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When checking if the user that we'll use for running the assemble step
is in the allowed user range, we strip any potential group part from the
value for the user that we extract from the image's configuration before
checking if it's in the allowed range, but we haven't been doing that
for values configured through the "s2i.assemble-user" label.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add option to set TLS in default docker config from environment variable DOCKER_TLS, same as docker cli (https://github.com/docker/cli/pull/863)
Adds tests
URL-like image names are required by containers/image in order to find the right
image repository and were propagated to the resulting Dockerfile. This change fixes
that by using containers/image API to properly extract the proper Docker image name.
This change adds the generate command to s2i, where it allows
the user to produce a Dockerfile able to be used by any build
system supporting the format, such as buildah and possibly
others.