fix: use debian buster to fix tests using no longer supported stretch which had broken apt-get urls (#2485)
This commit is contained in:
parent
ef83d80a62
commit
0b53835c0f
|
|
@ -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/
|
||||
|
|
|
|||
|
|
@ -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 .
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM debian:9.11
|
||||
FROM debian:10.13
|
||||
|
||||
ARG SSH_PRIVATE_KEY
|
||||
ARG SSH_PUBLIC_KEY
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM debian:9.11
|
||||
FROM debian:10.13
|
||||
EXPOSE 80
|
||||
EXPOSE 81/udp
|
||||
ENV protocol tcp
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM debian:9.11
|
||||
FROM debian:10.13
|
||||
LABEL foo=bar
|
||||
LABEL "baz"="bat"
|
||||
ENV label1 "mylabel"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM debian:9.11 as base
|
||||
FROM debian:10.13 as base
|
||||
COPY . .
|
||||
|
||||
FROM scratch as second
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM debian:9.11
|
||||
FROM debian:10.13
|
||||
VOLUME /foo1
|
||||
RUN echo "hello" > /foo1/hello
|
||||
WORKDIR /foo1/bar
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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,
|
||||
|
|
@ -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
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue