Merge branch '21521-aptly-flock'
[arvados-dev.git] / jenkins / packer-images / jenkins-image-workbench2.sh
1 #!/bin/bash
2
3 # Copyright (C) The Arvados Authors. All rights reserved.
4 #
5 # SPDX-License-Identifier: Apache-2.0
6
7 set -eo pipefail
8
9 # Get the arvados repository
10 cd /usr/src
11 sudo git clone https://git.arvados.org/arvados.git
12 cd arvados/services/workbench2
13
14 if [[ "$GIT_HASH" != "" ]]; then
15   echo "GIT_HASH is set to $GIT_HASH, checking out that revision..."
16   sudo git checkout $GIT_HASH
17 fi
18
19 # React uses a lot of filesystem watchers (via inotify). Increase the default
20 # so we have a higher limit at runtime.
21 echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
22 sudo sysctl -p
23
24 # Build the workbench2-build docker image
25 sudo make workbench2-build-image
26
27 cd ../../../
28 sudo rm -rf arvados