#!/usr/bin/env bash set -e #check to make sure this is a 64-bit machine getconf LONG_BIT | grep 64 > /dev/null || ( echo "Git Fusion requires a 64-bit machine. Exiting." && exit 1) sudo DEBIAN_FRONTEND=noninteractive apt-get -y install aptitude wget wget -q http://package.perforce.com/perforce.pubkey -O - | sudo apt-key add - #Update sources list with the Perforce Package repo. sudo echo "deb http://package.perforce.com/apt/ubuntu trusty release" >> /etc/apt/sources.list sudo aptitude update sudo DEBIAN_FRONTEND=noninteractive aptitude -y install helix-cli helix-p4d sudo /opt/perforce/sbin/configure-helix-p4d.sh -n perforce1 -p ssl:1666 -r /opt/perforce/servers/perforce1 -u super -P REinforce --unicode sudo DEBIAN_FRONTEND=noninteractive aptitude -y install helix-git-fusion sudo /opt/perforce/git-fusion/libexec/configure-git-fusion.sh -n --super super --superpassword REinforce --gfp4password REinforce --gfsysuser git --gfdir /opt/perforce/git-fusion/libexec --server local --p4port ssl:1666 --timezone Europe/London --unicode y --unknownuser pusher --https #Swap out the log config file cp git-fusion.log.conf /etc/git-fusion.log.conf #Set some system wide variables for the VM. sudo echo "export P4EDITOR=nano" >> /etc/bash.bashrc sudo echo "export P4PORT=ssl:localhost:1666" >> /etc/bash.bashrc sudo echo "export P4CONFIG=.p4config" >> /etc/bash.bashrc #Create a directory structure, that will be used for the GF admin workspace. mkdir -p workspaces/gf #Create a password file we use to log in echo REinforce > /app/passwd cd workspaces/gf echo "P4USER=super" > .p4config echo "P4PORT=ssl:localhost:1666" >> .p4config echo "P4CLIENT=gf_admin" >> .p4config p4 login < ../../passwd p4 client -i < /app/gf_client #Add the public key used for testing to the workspace. mkdir -p .git-fusion/users/jen/keys cp /app/docker_key.pub /app/workspaces/gf/.git-fusion/users/jen/keys #Put the config file for orca repo in the correct place mkdir -p .git-fusion/repos/orca cd .git-fusion/repos/orca cp /app/orca_config . mv orca_config p4gf_config #Now submit the configs and keys cd /app/workspaces/gf p4 reconcile p4 submit -d "Adding the key for user 'jen' and p4gf_config file for the Orca repo" #Now create the user jen p4 user -f -i < /app/gf_test_user #Now create the orca repo su - c git p4gf_init_repo.py orca
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 22781 | Jen Bottom | Adding a line to create the orca repo | ||
#6 | 22778 | Jen Bottom | Correcting a path that still pointed to the HWS dir used by Vagrant | ||
#5 | 22776 | Jen Bottom | Getting the Helix packages from the correct Trusty repo | ||
#4 | 22773 | Jen Bottom | Trying to get rid of the devcon messages | ||
#3 | 22738 | Jen Bottom | Removing the Vagrant specific paths from the bash script that sets up Git Fusion | ||
#2 | 22735 | Jen Bottom |
Changing docker user to root. Also installing wget using the gf.sh file, as it does not seem to be on this image |
||
#1 | 22734 | Jen Bottom | Adding the bash file to setup Git Fusion |