Recording of my steps to setup Ubuntu 20.04 buildbot VM on July 22, 2020. The bot is responsible for WebKit builds.
- Update apt-get & install clang-9 to be consistent with Ubuntu 18.04 bot.
~$ sudo apt-get update
~$ sudo apt-get install clang-9
~$ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 100
~$ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 100
- Azure VM has
/mnt
that belongs to root. Create acron
folder that will hold all our cron-based processing
~$ cd /mnt
/mnt$ sudo mkdir cron
/mnt$ sudo chown azureuser:azureuser cron
- Clone Playwright into
cron
directory
/mnt$ cd /mnt/cron
/mnt/cron$ git clone https://github.com/microsoft/playwright
- Install NVM to manage Node.js + NPM versions. Instructions generally live at NVM official readme. As of July 2020, I did the following:
/mnt/cron$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
/mnt/cron$ source ~/.bashrc # to get updated bin paths
- Install Node.js + Npm using NVM
/mnt/cron$ nvm install stable
- Just in case, install all dependencies for Playwright project
/mnt/cron$ cd /mnt/cron/playwright
/mnt/cron/playwright$ npm install
- Prepare checkout for WebKit.
/mnt/cron/playwright$ ./browser_patches/prepare_checkout.sh webkit
- Install WebKit dependencies
/mnt/cron/playwright$ ./browser_patches/webkit/checkout/Tools/gtk/install-dependencies
/mnt/cron/playwright$ ./browser_patches/webkit/checkout/Tools/wpe/install-dependencies
- Build WebKit
/mnt/cron/playwright$ ./browser_patches/webkit/build.sh
Build completed successfully, so browser toolchain is operational. 🎉
- Install Azure CLI using official docs
/mnt/cron/playwright$ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- Setup crontab to run buildbot scripts. Important parts here are:
MAILTO=""
to disable mail spamPATH="..."
has to be copied from the actualazureuser
path, since cron jobs run with a very basicPATH
.
MAILTO=""
PATH="/home/azureuser/.nvm/versions/node/v14.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
AZ_ACCOUNT_KEY="<KEY>"
AZ_ACCOUNT_NAME="<NAME>"
TELEGRAM_BOT_KEY="<TG_KEY>"
*/5 * * * * /mnt/cron/playwright/browser_patches/buildbots/buildbot-ubuntu-20.04.sh >/tmp/buildbot-ubuntu-20.04-cronjob.log