ci: add ci builder images jobs to buildkite

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2573
GitOrigin-RevId: 94038eba9ec77da5ac61551322861a6324682dad
This commit is contained in:
Divi 2021-10-14 17:49:06 +05:30 committed by hasura-bot
parent 3345f7946c
commit ed589f442d
4 changed files with 0 additions and 167 deletions

View File

@ -1,25 +0,0 @@
# NOTE!: If you update this file you need to:
#
# - take the hash of the new file with `sha256sum base.dockerfile`
# - update `&graphql_engine_base_image` in '.circleci/config.yml' with this new hash
# - update base image tag in 'server/packaging/build/Dockerfile' and 'pro/server/packaging/build/Dockerfile' with this new hash
FROM debian:buster-20210511-slim
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN groupadd -g 1001 hasura && useradd -m -u 1001 -g hasura hasura
RUN apt-get update \
&& apt-get install -y gnupg2 curl apt-transport-https \
&& curl -s https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& curl -s https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y ca-certificates libkrb5-3 libpq5 libnuma1 unixodbc-dev msodbcsql17 default-libmysqlclient-dev default-mysql-client \
&& apt-get -y remove curl gnupg2 \
&& apt-get -y auto-remove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/doc/ \
&& rm -rf /usr/share/man/ \
&& rm -rf /usr/share/locale/

View File

@ -1,40 +0,0 @@
FROM node:12.22-buster
ARG gcloud_version="207.0.0"
# update npm
RUN npm install -g npm@6
# install dependencies
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
netcat \
libpq5 \
libgtk2.0-0 \
libgtk-3-0 \
libgbm-dev \
libxtst6 \
xauth \
libnotify-dev \
libgconf-2-4 \
libnss3 \
libxss1 \
libasound2 \
xvfb \
&& curl -Lo /tmp/gcloud-${gcloud_version}.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${gcloud_version}-linux-x86_64.tar.gz \
&& tar -xzf /tmp/gcloud-${gcloud_version}.tar.gz -C /usr/local \
&& /usr/local/google-cloud-sdk/install.sh \
&& curl -s https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& curl -s https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y libkrb5-3 libnuma1 unixodbc-dev msodbcsql17 \
&& apt-get -y auto-remove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/doc/ \
&& rm -rf /usr/share/man/ \
&& rm -rf /usr/share/locale/
ENV PATH "/usr/local/google-cloud-sdk/bin:$PATH"

View File

@ -1,9 +0,0 @@
FROM mcr.microsoft.com/mssql/server:2019-CU10-ubuntu-20.04
ENV ACCEPT_EULA=Y
ENV SA_PASSWORD=${MSSQL_PASSWORD:-hasuraMSSQL1}
USER root
RUN apt-get update && \
apt-get install -y mssql-tools && \
ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/local/bin/sqlcmd

View File

@ -1,93 +0,0 @@
# NOTE!: If you update this file you need to:
#
# - take the hash of the new file with `sha256sum server-builder.dockerfile`
# - update `&server_builder_image` with this new hash (see TODO there)
# - if any system libraries were added, or the base image was changed, be sure
# to make the same modification to the packager dockerfile at: server/packaging/build/Dockerfile
#
# The builder image will then get rebuilt automatically, and used in the rest of the build pipeline.
#
# TODO we should combine this with server/packaging/build/Dockerfile using a multi-stage build:
# https://docs.docker.com/develop/develop-images/multistage-build/
#
# NOTE: this is symlinked from mono .circleci to oss-.circleci so that it is
# visible to OSS users, since it's at least a good reference
# FROM haskell:8.10.2-buster
FROM haskell:8.8.3-buster
# ^ Required to build 8.10.2 below;
ARG docker_ver="19.03.13"
ARG postgres_ver="13"
ARG node_ver="12.x"
# Install GNU make, curl, git and docker client. Required to build the server
RUN apt-get -y update \
&& apt-get -y install curl gnupg2 apt-transport-https \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& curl -s https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& curl -s https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& apt-get -y update \
&& apt-get install -y \
g++ gcc git gnupg libc6-dev libffi-dev libgmp-dev libkrb5-dev \
libpq-dev libssl-dev make netcat postgresql-client-${postgres_ver} \
postgresql-client-common python3 python3-pip upx xz-utils zlib1g-dev \
unixodbc-dev freetds-dev \
default-libmysqlclient-dev libghc-pcre-light-dev libkrb5-dev \
&& ACCEPT_EULA=Y apt-get -y install msodbcsql17 \
&& curl -sL https://deb.nodesource.com/setup_${node_ver} | bash - \
&& apt-get install -y nodejs \
&& curl -Lo /tmp/docker-${docker_ver}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${docker_ver}.tgz \
&& tar -xz -C /tmp -f /tmp/docker-${docker_ver}.tgz \
&& mv /tmp/docker/* /usr/bin \
&& apt-get -y auto-remove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/doc/ \
&& rm -rf /usr/share/man/ \
&& rm -rf /usr/share/locale/
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
# Pull in haskell-related paths; make sure to set the same path for bash interactivity
ENV PATH="/root/.cabal/bin:${PATH}:/opt/ghc/bin"
RUN echo "export PATH=${PATH}" >> /root/.bashrc
# ###################################
# Building Matt's GHC fork with:
# https://gitlab.haskell.org/mpickering/ghc/-/commits/wip/fd-decay-factor
#
# To revert, remove everything below this line, and change back the base image above.
RUN apt -y update \
&& apt -y install build-essential git autoconf python3 libgmp-dev libncurses-dev \
&& cabal v2-update \
&& cabal v2-install alex happy-1.19.12 \
&& git clone https://gitlab.haskell.org/ghc/ghc.git \
&& cd ghc \
&& git checkout ghc-8.10.2-release \
&& git submodule update --init --recursive \
&& git remote add mpickering https://gitlab.haskell.org/mpickering/ghc \
&& git fetch mpickering \
&& git merge 962b00e7fbf75913 \
&& ./boot && ./configure && make -j4 && make install \
&& cd / \
&& rm -rf ghc \
&& rm -rf /opt/ghc/ /root/.cabal/store
# adding this install step here to make use of build cache on docker build
# if not it'll trigger a rebuild of GHC
# if the man directories are missing, postgresql-client fails to install in debian
RUN mkdir -p /usr/share/man/man{1,7} && apt-get -y update
RUN apt-get -y update \
&& apt-get -y install pgbouncer jq postgresql-client-13 default-mysql-client procps
# Install Google Cloud SDK required to test BigQuery backend
# https://cloud.google.com/sdk/docs/install#deb
RUN curl https://sdk.cloud.google.com | bash -s -- --disable-prompts
# add the Google Cloud SDK command line tools to the $PATH.
ENV PATH="/root/google-cloud-sdk/bin:${PATH}"