taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

make-buildbot-sitesworker.sh (1289B)


      1 #!/bin/bash
      2 
      3 # Bootstrap the Taler setup for the sites-worker.
      4 
      5 set -eu
      6 
      7 if ! test "sites-worker" = $(whoami); then
      8   echo Only run as the 'sites-worker' user.
      9   exit 1
     10 fi
     11 
     12 export PATH=$HOME/.local/bin:$PATH
     13 
     14 pip install --user --break-system-packages buildbot-worker sphinxcontrib.video
     15 
     16 if [[ ! -d worker ]];
     17 then
     18   buildbot-worker create-worker --umask=0o22 ~/worker 127.0.0.1:19989 sites-worker sites-pass
     19   echo $HOSTNAME > worker/info/host
     20   echo "GNUnet.org admins <admin@gnunet.org>" > worker/info/admin
     21 fi
     22 
     23 BRANCH=master
     24 REPOS="anastasis anastasis-www taler-www twister taler-docs taler-tutorials taler-systems-www taler-ops-www buywith"
     25 
     26 cd $HOME
     27 
     28 for component in $REPOS;
     29 do
     30     if ! test -d "$HOME/$component" ;
     31     then
     32         git clone "git://git.taler.net/$component.git"
     33     fi
     34 done
     35 
     36 for component in $REPOS;
     37 do
     38   echo "Checking out $component to $BRANCH"
     39   git -C "$HOME/$component" checkout "$BRANCH"
     40 done
     41 mkdir -p ./stamps
     42 
     43 ln -sf ../taler-deployment/worker-sites/Makefile stamps/
     44 ln -sf ../taler-deployment/worker-sites/invalidate.sh stamps/
     45 
     46 if [[ ! -d worker ]];
     47 then
     48   buildbot-worker create-worker --umask=0o22 ~/worker localhost:9988 sites-worker sites-pass
     49   echo $HOSTNAME > worker/info/host
     50   echo "GNUnet.org admins <admin@gnunet.org>" > worker/info/admin
     51 fi