Skip to content

Commit

Permalink
ci: switch back to using bionic agent for x64 linux (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 authored Jul 18, 2023
1 parent 28d7221 commit c6b5814
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
jobs:
- job: focal_x64
- job: bionic_x64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
arch: focal-x64
arch: bionic-x64

- job: centos7_devtoolset8_x64
pool:
Expand Down
86 changes: 86 additions & 0 deletions bionic-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
ARG REPO=mcr.microsoft.com/mirror/docker/library/ubuntu
ARG TAG=18.04
FROM ${REPO}:${TAG}

ARG DEBIAN_FRONTEND=noninteractive

RUN groupadd --gid 1000 builduser \
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser \
&& mkdir -p /setup

# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp

# Latest stable git
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository ppa:git-core/ppa -y

RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
file \
git \
gnome-keyring \
iproute2 \
libfuse2 \
libgconf-2-4 \
libgdk-pixbuf2.0-0 \
libgl1 \
libgtk-3.0 \
libsecret-1-dev \
libssl-dev \
libx11-dev \
libx11-xcb-dev \
libxkbfile-dev \
locales \
lsb-release \
lsof \
python-dbus \
python3-pip \
sudo \
wget \
xvfb \
tzdata \
unzip \
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.sh\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.sh \
&& curl https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.py\?format\=TEXT | base64 --decode | cat > /setup/install-build-deps.py \
# Remove snapcraft to avoid issues on docker build
&& sed -i 's/packages.append("snapcraft")/#packages.append("snapcraft")/g' /setup/install-build-deps.py \
&& chmod +x /setup/install-build-deps.sh \
&& chmod +x /setup/install-build-deps.py \
&& bash /setup/install-build-deps.sh --no-syms --no-prompt --no-chromeos-fonts --no-arm --no-nacl \
&& rm -rf /var/lib/apt/lists/*

# Yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y yarn

# No Sudo Prompt
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep

# Dotnet
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt-get update && apt-get install -y dotnet-sdk-2.1

# Set python3 as default
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
RUN python --version

# Add xvfb init script
COPY xvfb-init.sh /etc/init.d/xvfb
RUN chmod a+x /etc/init.d/xvfb

# Setup dbus path
RUN sudo mkdir -p /var/run/dbus

# Check compiler toolchain
RUN gcc --version
RUN g++ --version

USER builduser
WORKDIR /home/builduser
3 changes: 3 additions & 0 deletions bionic-x64/xvfb-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
XVFB=/usr/bin/Xvfb
XVFBARGS=":10 -ac -screen 0 1280x800x24 -nolisten tcp -dpi 96 +extension RANDR"
/sbin/start-stop-daemon --start --quiet --background --exec $XVFB -- $XVFBARGS

0 comments on commit c6b5814

Please sign in to comment.