Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use debian buster to fix tests using no longer supported stretch which had broken apt-get urls #2485

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_add
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13
# First, try adding some regular files
ADD context/foo foo
ADD context/foo /foodir/
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_add_404
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13

# Testing that any HTTP failure is handled properly
ADD https://httpstat.us/404 .
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_arg_secret
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13

ARG SSH_PRIVATE_KEY
ARG SSH_PUBLIC_KEY
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_cache
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# If the image is built twice, /date should be the same in both images
# if the cache is implemented correctly

FROM debian:9.11
FROM debian:10.13
RUN date > /date
COPY context/foo /foo
RUN echo hey
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_cache_install
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# /date should be the same regardless of when this image is built
# if the cache is implemented correctly

FROM debian:9.11
FROM debian:10.13
WORKDIR /foo
RUN apt-get update && apt-get install -y make
COPY context/bar /context
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_cache_install_oci
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# /date should be the same regardless of when this image is built
# if the cache is implemented correctly

FROM debian:9.11
FROM debian:10.13
WORKDIR /foo
RUN apt-get update && apt-get install -y make
COPY context/bar /context
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_cache_oci
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# If the image is built twice, /date should be the same in both images
# if the cache is implemented correctly

FROM debian:9.11
FROM debian:10.13
RUN date > /date
COPY context/foo /foo
RUN echo hey
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13
RUN echo "hey" > /tmp/foo

FROM debian:9.11
FROM debian:10.13
RUN groupadd --gid 5000 testgroup
COPY --from=0 --chown=1001:1001 /tmp/foo /tmp/baz
# with existing group
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13
ENV hey hey
ENV PATH /usr/local
ENV testmultipleeq="this=is a=test string=with a=lot of=equals"
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_expose
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13
EXPOSE 80
EXPOSE 81/udp
ENV protocol tcp
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_extract_fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_label
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13
LABEL foo=bar
LABEL "baz"="bat"
ENV label1 "mylabel"
Expand Down
4 changes: 2 additions & 2 deletions integration/dockerfiles/Dockerfile_test_multistage
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11 as base
FROM debian:10.13 as base
COPY . .

FROM scratch as second
Expand All @@ -20,4 +20,4 @@ FROM fedora@sha256:c4cc32b09c6ae3f1353e7e33a8dda93dc41676b923d6d89afa996b421cc5a
FROM fourth
ARG file
COPY --from=second /foo ${file}
COPY --from=debian:9.11 /etc/os-release /new
COPY --from=debian:10.13 /etc/os-release /new
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_run
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13
RUN echo "hey" > /etc/foo
RUN echo "baz" > /etc/baz
RUN cp /etc/baz /etc/bar
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_run_2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# Test to make sure the executor builds an image correctly
# when no files are changed

FROM debian:9.11
FROM debian:10.13
RUN echo "hey"
MAINTAINER kaniko
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_run_new
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13
RUN echo "hey" > /etc/foo
RUN echo "baz" > /etc/baz
RUN cp /etc/baz /etc/bar
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_run_redo
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13
RUN echo "hey" > /etc/foo
RUN echo "baz" > /etc/baz
RUN cp /etc/baz /etc/bar
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_user
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13
USER testuser:testgroup

2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_user_home
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13

# default values for the root user.
RUN touch $HOME/hello
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_user_nonexisting
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13
USER 1001:1001
RUN echo "hey2" > /tmp/foo
USER 1001
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_user_run
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:9.11
FROM debian:10.13
RUN useradd testuser
RUN groupadd testgroup
USER testuser:testgroup
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_volume
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13
RUN mkdir /foo
RUN echo "hello" > /foo/hey
VOLUME /foo/bar /tmp /qux/quux
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_volume_2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13
VOLUME /foo1
RUN echo "hello" > /foo1/hello
WORKDIR /foo1/bar
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_workdir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13
COPY context/foo foo
WORKDIR test
# Test that this will be appended on to the previous command, to create /test/workdir
Expand Down
2 changes: 1 addition & 1 deletion integration/dockerfiles/Dockerfile_test_workdir_with_user
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:9.11
FROM debian:10.13
RUN groupadd -g 10000 bar
RUN useradd -c "Foo user" -u 10000 -g 10000 -m foo

Expand Down
2 changes: 1 addition & 1 deletion integration/integration_with_stdin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestBuildWithStdin(t *testing.T) {
dockerfile := "Dockerfile_test_stdin"

files := map[string]string{
dockerfile: "FROM debian:9.11\nRUN echo \"hey\"",
dockerfile: "FROM debian:10.13\nRUN echo \"hey\"",
}

if err := testutil.SetupFiles(testDir, files); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/buildcontext/tar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func TestBuildWithLocalTar(t *testing.T) {
nonExistingDockerfile := "Dockerfile_non_existing"

files := map[string]string{
validDockerfile: "FROM debian:9.11\nRUN echo \"valid\"",
invalidDockerfile: "FROM debian:9.11\nRUN echo \"invalid\"",
validDockerfile: "FROM debian:10.13\nRUN echo \"valid\"",
invalidDockerfile: "FROM debian:10.13\nRUN echo \"invalid\"",
}

if err := testutil.SetupFiles(testDir, files); err != nil {
Expand Down
18 changes: 9 additions & 9 deletions pkg/dockerfile/dockerfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ func Test_SkipingUnusedStages(t *testing.T) {
{
description: "dockerfile_with_two_copyFrom_and_arg",
dockerfile: `
FROM debian:9.11 as base
FROM debian:10.13 as base
COPY . .
FROM scratch as second
ENV foopath context/foo
Expand All @@ -616,13 +616,13 @@ func Test_SkipingUnusedStages(t *testing.T) {
FROM fourth
ARG file=/foo2
COPY --from=second /foo ${file}
COPY --from=debian:9.11 /etc/os-release /new
COPY --from=debian:10.13 /etc/os-release /new
`,
targets: []string{"base", ""},
expectedSourceCodes: map[string][]string{
"base": {"FROM debian:9.11 as base"},
"second": {"FROM debian:9.11 as base", "FROM scratch as second"},
"": {"FROM debian:9.11 as base", "FROM scratch as second", "FROM base as fourth", "FROM fourth"},
"base": {"FROM debian:10.13 as base"},
"second": {"FROM debian:10.13 as base", "FROM scratch as second"},
"": {"FROM debian:10.13 as base", "FROM scratch as second", "FROM base as fourth", "FROM fourth"},
},
expectedTargetIndexBeforeSkip: map[string]int{
"base": 0,
Expand All @@ -639,9 +639,9 @@ func Test_SkipingUnusedStages(t *testing.T) {
description: "dockerfile_without_final_dependencies",
dockerfile: `
FROM alpine:3.11
FROM debian:9.11 as base
FROM debian:10.13 as base
RUN echo foo > /foo
FROM debian:9.11 as fizz
FROM debian:10.13 as fizz
RUN echo fizz >> /fizz
COPY --from=base /foo /fizz
FROM alpine:3.11 as buzz
Expand All @@ -653,8 +653,8 @@ func Test_SkipingUnusedStages(t *testing.T) {
expectedSourceCodes: map[string][]string{
"final": {"FROM alpine:3.11 as final"},
"buzz": {"FROM alpine:3.11 as buzz"},
"fizz": {"FROM debian:9.11 as base", "FROM debian:9.11 as fizz"},
"": {"FROM alpine:3.11", "FROM debian:9.11 as base", "FROM debian:9.11 as fizz", "FROM alpine:3.11 as buzz", "FROM alpine:3.11 as final"},
"fizz": {"FROM debian:10.13 as base", "FROM debian:10.13 as fizz"},
"": {"FROM alpine:3.11", "FROM debian:10.13 as base", "FROM debian:10.13 as fizz", "FROM alpine:3.11 as buzz", "FROM alpine:3.11 as final"},
},
expectedTargetIndexBeforeSkip: map[string]int{
"final": 4,
Expand Down