From 172a4ac8e7287daa2999156826f280afb91dc65e Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Thu, 28 Jan 2021 04:45:18 +0000 Subject: [PATCH] Update Ruby 2.6 to 2.7 in www-gitlab-com image Drops Ruby 2.4 test and build. Signed-off-by: Takuya Noguchi --- .gitlab-ci.yml | 4 ++-- Dockerfile.www-gitlab-com-2.4 | 10 ---------- Dockerfile.www-gitlab-com-2.6 | 10 ---------- Dockerfile.www-gitlab-com-2.7 | 17 +++++++++++++++++ scripts/install-www-gitlab-com | 20 ++++++-------------- 5 files changed, 25 insertions(+), 36 deletions(-) delete mode 100644 Dockerfile.www-gitlab-com-2.4 delete mode 100644 Dockerfile.www-gitlab-com-2.6 create mode 100644 Dockerfile.www-gitlab-com-2.7 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec52c0b..d7b3eba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,7 +121,7 @@ omnibus-gitlab-cve-search test: *test_build release-tools test: *test_build sitespeed-gitlab test: *test_build ubi-release test: *test_build -www-gitlab-com-2.6 test: *test_build +www-gitlab-com-2.7 test: *test_build build-git: *test_build terraform test: *test_build # Used by go projects for linting https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/go_guide/index.md#automatic-linting @@ -195,7 +195,7 @@ omnibus-gitlab-cve-search: *build_and_deploy release-tools: *build_and_deploy sitespeed-gitlab: *build_and_deploy ubi-release: *build_and_deploy -www-gitlab-com-2.6: *build_and_deploy +www-gitlab-com-2.7: *build_and_deploy build-git: *build_and_deploy terraform: *build_and_deploy # Used by go projects for linting https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/go_guide/index.md#automatic-linting diff --git a/Dockerfile.www-gitlab-com-2.4 b/Dockerfile.www-gitlab-com-2.4 deleted file mode 100644 index f85d945..0000000 --- a/Dockerfile.www-gitlab-com-2.4 +++ /dev/null @@ -1,10 +0,0 @@ -FROM ruby:2.4-slim - -ADD /scripts/ /scripts/ -RUN /scripts/install-www-gitlab-com - -# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -# Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 diff --git a/Dockerfile.www-gitlab-com-2.6 b/Dockerfile.www-gitlab-com-2.6 deleted file mode 100644 index 27d59b1..0000000 --- a/Dockerfile.www-gitlab-com-2.6 +++ /dev/null @@ -1,10 +0,0 @@ -FROM ruby:2.6.6-slim-stretch - -ADD /scripts/ /scripts/ -RUN /scripts/install-www-gitlab-com - -# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -# Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 diff --git a/Dockerfile.www-gitlab-com-2.7 b/Dockerfile.www-gitlab-com-2.7 new file mode 100644 index 0000000..0cc58cc --- /dev/null +++ b/Dockerfile.www-gitlab-com-2.7 @@ -0,0 +1,17 @@ +FROM gcr.io/google.com/cloudsdktool/cloud-sdk as gcloud-sdk + +FROM ruby:2.7.2-slim + +ADD /scripts/ /scripts/ +RUN /scripts/install-www-gitlab-com + +# Install Google Cloud SDK for deploys via rsync +COPY --from=gcloud-sdk /usr/lib/google-cloud-sdk /usr/lib/google-cloud-sdk +COPY --from=gcloud-sdk /usr/share/google-cloud-sdk /usr/share/google-cloud-sdk +RUN cd /usr/bin && find ../lib/google-cloud-sdk/bin -type f exec ln -s {} \;; cd - + +# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ +# Must be set after install-essentials is run +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 diff --git a/scripts/install-www-gitlab-com b/scripts/install-www-gitlab-com index 9d57f79..7dc822e 100755 --- a/scripts/install-www-gitlab-com +++ b/scripts/install-www-gitlab-com @@ -5,13 +5,15 @@ IFS=$'\n\t' export DEBIAN_FRONTEND=noninteractive +# echo "deb http://deb.debian.org/debian testing main" | tee -a /etc/apt/sources.list.d/testing.list # Install LaTeX and other packages apt-get update apt-get install -yq --no-install-recommends \ make gcc g++ locales \ rsync git-core texlive-latex-recommended texlive-xetex \ texlive-fonts-recommended lmodern ed file curl gnupg2 \ - unzip + unzip \ + python3 python3-pip python3-crcmod # Install pandoc cd /tmp @@ -20,12 +22,6 @@ tar xvf pandoc-2.3.1-linux.tar.gz cp pandoc-2.3.1/bin/* /usr/local/bin rm -rf /tmp/pandoc* -# Install Google Cloud SDK for deploys via rsync -echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list -curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - -apt-get update -apt-get install -yq --no-install-recommends google-cloud-sdk python-crcmod python3-crcmod - # Install Imagemagick for cropping the pictures on the team page apt-get install -yq --no-install-recommends imagemagick @@ -35,15 +31,11 @@ YARN_INSTALL_VERSION=1.21.1-1 /scripts/install-node $NODE_INSTALL_VERSION $YARN_INSTALL_VERSION && node --version && yarn --version # Install yamllint -# We need the latest version -# https://packages.debian.org/testing/yamllint +# We need version 1.25.0+: https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst YAMLLINT_VERSION=1.25.0 -echo "deb http://deb.debian.org/debian testing main" | tee -a /etc/apt/sources.list.d/testing.list -apt update -# Fix for immediate configuration error - https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/332 -apt -t testing install -o APT::Immediate-Configure=false -yq libcrypt1 -apt -t testing install -yq yamllint=${YAMLLINT_VERSION}-1 +# Temporarily pin pyyaml and pathspec to reduce compatibility with packages from Debian bullseye (testing) +pip3 install yamllint==${YAMLLINT_VERSION} pyyaml==5.4.1 pathspec==0.8.1 # Install gitlab-runner curl -O -J -L https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-ci-multi-runner-linux-amd64