Merge branch 'master' into sh-bump-chrome-and-chromedriver-v66

This commit is contained in:
Stan Hu 2018-06-08 10:40:42 -07:00
commit 2c26a37c40
9 changed files with 115 additions and 41 deletions

View file

@ -45,7 +45,7 @@ before_script:
.build_and_deploy_custom: &build_and_deploy_custom
stage: build
script:
- ./scripts/custom-docker-build $CI_BUILD_NAME -t "$CI_REGISTRY_IMAGE:$CI_JOB_NAME"
- ./scripts/custom-docker-build $CI_JOB_NAME -t "$CI_REGISTRY_IMAGE:$CI_JOB_NAME"
- docker push "$CI_REGISTRY_IMAGE:$CI_JOB_NAME"
only:
- master
@ -53,20 +53,27 @@ before_script:
# Tests
# Used by Gitaly: https://gitlab.com/gitlab-org/gitaly/blob/master/.gitlab-ci.yml
ruby-2.3-golang-1.9-git-2.16 test: *test_custom
ruby-2.3-golang-1.9-git-2.14 test: *test_custom
ruby-2.3-golang-1.9-git-2.9 test: *test_custom
ruby-2.3-golang-1.10-git-2.14 test: *test_custom
ruby-2.3-golang-1.9-git-2.14 test: *test_custom
ruby-2.3-golang-1.9-git-2.16 test: *test_custom
ruby-2.3-golang-1.9-git-2.17 test: *test_custom
ruby-2.3-golang-1.10-git-2.9 test: *test_custom
ruby-2.3-golang-1.10-git-2.14 test: *test_custom
ruby-2.3-golang-1.10-git-2.16 test: *test_custom
ruby-2.3-golang-1.10-git-2.17 test: *test_custom
ruby-2.4-golang-1.9-git-2.9 test: *test_custom
ruby-2.4-golang-1.9-git-2.14 test: *test_custom
ruby-2.4-golang-1.9-git-2.16 test: *test_custom
ruby-2.4-golang-1.9-git-2.17 test: *test_custom
ruby-2.4-golang-1.10-git-2.14 test: *test_custom
ruby-2.4-golang-1.10-git-2.16 test: *test_custom
ruby-2.4-golang-1.10-git-2.17 test: *test_custom
# Used by GitLab CE/EE: https://gitlab.com/gitlab-org/gitlab-ee/blob/master/.gitlab-ci.yml
ruby-2.3.7-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
ruby-2.3.7-golang-1.9-git-2.17-chrome-66.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
ruby-2.4.1-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
ruby-2.4.4-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
ruby-2.4.4-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
ruby-2.4.4-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29 test: *test_custom
ruby-2.4.4-golang-1.9-git-2.17-chrome-66.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29 test: *test_custom
# Not used anymore (?)
golang-1.9-git-2.9.0 test: *test_custom
@ -84,7 +91,7 @@ node-8.9-chrome-63.0-yarn-1.2 test: *test_custom
# Used by https://gitlab.com/gitlab-org/distribution/gitlab-provisioner/
ruby-2.3-ansible-2.5.1-terraform-0.11 test: *test_custom
www-gitlab-com test: *test_build
www-gitlab-com-2.4 test: *test_build
gitlab-qa test: *test_build
omnibus-gitlab-centos6 test: *test_build
omnibus-gitlab-centos7 test: *test_build
@ -100,20 +107,27 @@ sitespeed-gitlab test: *test_build
# Builds
# Used by Gitaly: https://gitlab.com/gitlab-org/gitaly/blob/master/.gitlab-ci.yml
ruby-2.3-golang-1.9-git-2.9: *build_and_deploy_custom
ruby-2.3-golang-1.9-git-2.14: *build_and_deploy_custom
ruby-2.3-golang-1.9-git-2.16: *build_and_deploy_custom
ruby-2.3-golang-1.9-git-2.17: *build_and_deploy_custom
ruby-2.3-golang-1.9-git-2.9: *build_and_deploy_custom
ruby-2.3-golang-1.10-git-2.9: *build_and_deploy_custom
ruby-2.3-golang-1.10-git-2.14: *build_and_deploy_custom
ruby-2.3-golang-1.10-git-2.16: *build_and_deploy_custom
ruby-2.3-golang-1.10-git-2.9: *build_and_deploy_custom
ruby-2.3-golang-1.10-git-2.17: *build_and_deploy_custom
ruby-2.4-golang-1.9-git-2.9: *build_and_deploy_custom
ruby-2.4-golang-1.9-git-2.14: *build_and_deploy_custom
ruby-2.4-golang-1.9-git-2.16: *build_and_deploy_custom
ruby-2.4-golang-1.9-git-2.17: *build_and_deploy_custom
ruby-2.4-golang-1.10-git-2.14: *build_and_deploy_custom
ruby-2.4-golang-1.10-git-2.16: *build_and_deploy_custom
ruby-2.4-golang-1.10-git-2.17: *build_and_deploy_custom
# Used by GitLab CE/EE: https://gitlab.com/gitlab-org/gitlab-ee/blob/master/.gitlab-ci.yml
ruby-2.3.7-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom
ruby-2.3.7-golang-1.9-git-2.17-chrome-66.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom
ruby-2.4.1-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom
ruby-2.4.4-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom
ruby-2.4.4-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29: *build_and_deploy_custom
ruby-2.4.4-golang-1.9-git-2.17-chrome-66.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom
ruby-2.4.4-golang-1.9-git-2.17-chrome-66.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29: *build_and_deploy_custom
# Used by https://gitlab.com/gitlab-org/trello-power-up/blob/master/.gitlab-ci.yml (?)
node-8.9-chrome-63.0-yarn-1.2: *build_and_deploy_custom
@ -133,7 +147,7 @@ golang-1.10-git-2.17: *build_and_deploy_custom
# Used by https://gitlab.com/gitlab-org/distribution/gitlab-provisioner/
ruby-2.3-ansible-2.5.1-terraform-0.11: *build_and_deploy_custom
www-gitlab-com: *build_and_deploy
www-gitlab-com-2.4: *build_and_deploy
gitlab-qa: *build_and_deploy
omnibus-gitlab-centos6: *build_and_deploy
omnibus-gitlab-centos7: *build_and_deploy

View file

@ -39,10 +39,8 @@ ARG GOLANG_DOWNLOAD_SHA256
RUN if [ -n "$INSTALL_GOLANG_VERSION" ] ; then /scripts/install-golang "${INSTALL_GOLANG_VERSION}" "${GOLANG_DOWNLOAD_SHA256}" && go version; fi
# Postgres
# Codedebt: currently this will only install the default version of postgres,
# not the stipulated version
ARG POSTGRES_VERSION
RUN if [ -n "$POSTGRES_VERSION" ] ; then /scripts/install-postgresql; fi
RUN if [ -n "$POSTGRES_VERSION" ] ; then /scripts/install-postgresql $POSTGRES_VERSION; fi
# Ansible
ARG ANSIBLE_VERSION
@ -53,6 +51,12 @@ ARG TERRAFORM_VERSION
ARG TERRAFORM_DOWNLOAD_SHA256
RUN if [ -n "$TERRAFORM_VERSION" ] ; then /scripts/install-terraform $TERRAFORM_VERSION $TERRAFORM_DOWNLOAD_SHA256; fi
# GraphicsMagick
ARG GRAPHISMAGICK_VERSION
ARG GRAPHISMAGICK_DOWNLOAD_URL=http://ftp.icm.edu.pl/pub/unix/graphics/GraphicsMagick/1.3/GraphicsMagick-${GRAPHISMAGICK_VERSION}.tar.gz
ARG GRAPHISMAGICK_DOWNLOAD_SHA256
RUN if [ -n "$GRAPHISMAGICK_VERSION" ]; then /scripts/install-graphicsmagick && gm version; fi
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en

View file

@ -1,4 +1,4 @@
FROM ruby:2.3-slim
FROM ruby:2.4-slim
ADD / /
RUN /scripts/install-www-gitlab-com

View file

@ -46,14 +46,15 @@ Each of the following parts represents another feature and version. Available
options are:
1. `golang`
2. `git`
3. `chrome`
4. `node`
5. `yarn`
6. `phantomjs`
7. `postgres`
8. `terraform`
9. `ansible`
1. `git`
1. `chrome`
1. `node`
1. `yarn`
1. `phantomjs`
1. `postgres`
1. `terraform`
1. `ansible`
1. `graphicsmagick`
### Adding a new build

View file

@ -83,16 +83,16 @@ function print_git_args() {
GIT_DOWNLOAD_SHA256=cb53e6b388d8d19189933366c1fe5c1ca500e8b227b9e707af39c3d879e41015
;;
2.14)
GIT_VERSION=2.14.3
GIT_DOWNLOAD_SHA256=023ffff6d3ba8a1bea779dfecc0ed0bb4ad68ab8601d14435dd8c08416f78d7f
GIT_VERSION=2.14.4
GIT_DOWNLOAD_SHA256=0556330e267dc968749619cd90ff6a815eda26f0c89faa5cfba56756e852202f
;;
2.16)
GIT_VERSION=2.16.3
GIT_DOWNLOAD_SHA256=dda229e9c73f4fbb7d4324e0d993e11311673df03f73b194c554c2e9451e17cd
GIT_VERSION=2.16.4
GIT_DOWNLOAD_SHA256=e8709ebcda3d793cd933ca55004814959bb8e6fa518b5b37f602d9881e489d2e
;;
2.17)
GIT_VERSION=2.17.0
GIT_DOWNLOAD_SHA256=7a0cff35dbb14b77dca6924c33ac9fe510b9de35d5267172490af548ec5ee1b8
GIT_VERSION=2.17.1
GIT_DOWNLOAD_SHA256=ec6452f0c8d5c1f3bcceabd7070b8a8a5eea11d4e2a04955c139b5065fd7d09a
;;
*) echo "Unknown git version $1"; exit 1;
esac
@ -140,9 +140,28 @@ function print_terraform_args() {
printf -- "--build-arg TERRAFORM_DOWNLOAD_SHA256=%s " "$TERRAFORM_DOWNLOAD_SHA256"
}
function print_graphicsmagick_args() {
case "$1" in
1.3.29)
GRAPHISMAGICK_VERSION=1.3.29
GRAPHISMAGICK_DOWNLOAD_SHA256=de820cd10597205941a7e9d02c2e679231e92e8e769c204ef09034d2279ad453
;;
*) echo "Unknown graphicsmagick version $1"; exit 1;
esac
printf -- "--build-arg GRAPHISMAGICK_VERSION=%s " "$GRAPHISMAGICK_VERSION"
printf -- "--build-arg GRAPHISMAGICK_DOWNLOAD_SHA256=%s " "$GRAPHISMAGICK_DOWNLOAD_SHA256"
}
function parse_arguments() {
read base
read base_version
# Lock Ruby to Debian stretch
case "$base" in
ruby) base_version="$base_version-stretch" ;;
esac
printf -- "-f Dockerfile.custom " "$base"
printf -- "--build-arg CUSTOM_IMAGE_NAME=%s " "$base"
printf -- "--build-arg CUSTOM_IMAGE_VERSION=%s " "$base_version"
@ -157,6 +176,7 @@ function parse_arguments() {
postgresql) print_postgres_args $version ;;
ansible) print_ansible_args $version ;;
terraform) print_terraform_args $version ;;
graphicsmagick) print_graphicsmagick_args $version ;;
*) exit 1;;
esac
done

View file

@ -16,13 +16,6 @@ apt-get install -y \
libkrb5-dev postgresql-client mysql-client unzip \
libre2-dev gettext \
echo deb http://httpredir.debian.org/debian stretch main > /etc/apt/sources.list.d/stretch.list
apt-get update -yqqq
apt-get install -yqq --force-yes git
rm /etc/apt/sources.list.d/stretch.list
apt-get update -yqqq
apt-get clean -yqq
# Set UTF-8

41
scripts/install-graphicsmagick Executable file
View file

@ -0,0 +1,41 @@
#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
mkdir build \
&& curl -fsSL "$GRAPHISMAGICK_DOWNLOAD_URL" -o graphicsmagick.tar.gz \
&& echo "$GRAPHISMAGICK_DOWNLOAD_SHA256 graphicsmagick.tar.gz" | sha256sum -c - \
&& tar -C build -xzf graphicsmagick.tar.gz \
&& cd build/GraphicsMagick-$GRAPHISMAGICK_VERSION \
&& chmod +x configure \
&& ./configure \
--prefix=/usr/local \
--disable-openmp \
--without-magick-plus-plus \
--with-perl=no \
--without-bzlib \
--without-dps \
--without-fpx \
--without-gslib \
--without-jbig \
--without-webp \
--without-jpeg \
--without-jp2 \
--without-lcms2 \
--without-lzma \
--with-png \
--with-sysroot=/usr/local \
--without-tiff \
--without-trio \
--without-ttf \
--without-umem \
--without-wmf \
--without-xml \
--with-zlib \
--without-x \
&& make \
&& make install \
&& cd ../.. \
&& rm -rf build \
&& rm graphicsmagick.tar.gz

View file

@ -2,10 +2,11 @@
set -xeuo pipefail
IFS=$'\n\t'
POSTGRES_VERSION=${1:-9.6}
export DEBIAN_FRONTEND=noninteractive
curl -sS -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg ${POSTGRES_VERSION}" | tee /etc/apt/sources.list.d/postgresql.list
apt-get update
apt-get install -y postgresql-client

View file

@ -9,7 +9,7 @@ apt-get update
apt-get install -yq --no-install-recommends \
make gcc g++ locales \
git-core pandoc texlive-latex-recommended texlive-xetex \
texlive-fonts-recommended lmodern ed file curl
texlive-fonts-recommended lmodern ed file curl gnupg2
apt-get autoremove -yq