Skip to content

Commit

Permalink
Add Dockerfile for e2e base image
Browse files Browse the repository at this point in the history
Add a Dockerfile which will be used to create the base images
used for running the e2e tests. This allows us direct control
over the Chrome and Node.js versions used instead of waiting
for Cypress to release a new image which happens very infrequently.

Move the kubectl install and much of the other config into
this Dockerfile so that the one used to package the tests is
more focused and doesn't have to duplicate the foundations each
time the tests run.

Pipeline definitions and related config to build and publish
the image will follow separately.
  • Loading branch information
AlanGreene authored and tekton-robot committed Feb 1, 2024
1 parent 071207c commit 3e6ebe5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions packages/e2e/base-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2024 The Tekton Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# The exact version must be used for these, no wildcards or shorthands are supported.
# https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
# https://nodejs.org/en/about/previous-releases

ARG CHROME_VERSION='121.0.6167.139-1'
ARG NODE_VERSION='20.11.0'

FROM cypress/factory

RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gpg &&\
mkdir -p /etc/apt/keyrings &&\
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg &&\
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list &&\
apt-get update && apt-get install -y kubectl &&\
rm -rf /var/lib/apt/lists/*
USER node
WORKDIR /home/node
ENV CI=true
ENV NO_COLOR=true

0 comments on commit 3e6ebe5

Please sign in to comment.