Skip to content

Commit

Permalink
Fix nfstest.sh to use home dir instead of whole /Users (Test only) (d…
Browse files Browse the repository at this point in the history
…dev#1630)

* Fix nfstest.sh to use home dir instead of whole /Users

* Improve linux and macos circleci setup

* Fix linux circleci setup script
  • Loading branch information
rfay authored May 30, 2019
1 parent cf26e7b commit e03fbde
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
15 changes: 2 additions & 13 deletions .buildkite/nfstest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,8 @@ function cleanup {
}
trap cleanup EXIT

OS=$(go env GOOS)

case $OS in
linux)
share=/home
;;
darwin)
share=/Users
;;
windows)
share=/C/Users
;;
esac
mkdir -p ~/.ddev
share="${HOME}/.ddev"

# Find host.docker.internal name using host-docker-internal.sh script
hostDockerInternal=$($(dirname $0)/../scripts/host-docker-internal.sh)
Expand Down
7 changes: 6 additions & 1 deletion .circleci/linux_circle_vm_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ done

mkcert -install

sudo bash -c "printf '/home 10.0.0.0/255.0.0.0(rw,sync,no_subtree_check) 172.16.0.0/255.240.0.0(rw,sync,no_subtree_check) 192.168.0.0/255.255.0.0(rw,sync,no_subtree_check)\n/tmp 10.0.0.0/255.0.0.0(rw,sync,no_subtree_check) 172.16.0.0/255.240.0.0(rw,sync,no_subtree_check) 192.168.0.0/255.255.0.0(rw,sync,no_subtree_check)' >>/etc/exports"
primary_ip=$(ip route get 1 | awk '{gsub("^.*src ",""); print $1; exit}')

sudo bash -c "cat <<EOF >/etc/exports
${HOME} ${primary_ip}/255.255.255.255(rw,sync,no_subtree_check)
EOF"

sudo service nfs-kernel-server restart

# gotestsum
Expand Down
2 changes: 1 addition & 1 deletion .circleci/macos_circle_vm_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ GOTESTSUM_VERSION=0.3.2
curl -fsSL -o /tmp/gotestsum.tgz https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_darwin_amd64.tar.gz && tar -C /usr/local/bin -zxf /tmp/gotestsum.tgz gotestsum

sudo bash -c "cat <<EOF >/etc/exports
/Users -alldirs -mapall=$(id -u):$(id -g) localhost
${HOME} -alldirs -mapall=$(id -u):$(id -g) localhost
/private/var -alldirs -mapall=$(id -u):$(id -g) localhost
EOF"

Expand Down

0 comments on commit e03fbde

Please sign in to comment.