-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Checking for a link && using "-f" is redundant. * Helper scripts that are not used anywhere else feels weird to me.
- Loading branch information
Aakash Shah
committed
Jul 8, 2020
1 parent
ee159f3
commit 8358550
Showing
3 changed files
with
32 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,39 +2,51 @@ | |
|
||
set -e | ||
|
||
source ./helpers/clone.sh | ||
source ./helpers/disable-cred-hook.sh | ||
function clone { | ||
local repo=$1 | ||
local destination=$2 | ||
local branch=${3:-master} | ||
|
||
if [ ! -d $destination ]; then | ||
echo "Cloning $destination" | ||
git clone $repo $destination --branch $branch | ||
else | ||
echo "$destination already present, skipping" | ||
fi | ||
} | ||
|
||
pushd ~/workspace > /dev/null | ||
function disable_cred_hook { | ||
mkdir -p "${1}/.git/hooks" | ||
cat > "${1}/.git/hooks/post-merge" << EOT | ||
#!/usr/bin/env bash | ||
# Override the default hook that complains about credentials | ||
exit 1 | ||
EOT | ||
chmod +x "${1}/.git/hooks/post-merge" | ||
} | ||
|
||
pushd ~/workspace > /dev/null | ||
clone [email protected]:pivotal/pivotal_ide_prefs.git ~/workspace/pivotal_ide_prefs | ||
clone [email protected]:cloudfoundry/capi-release.git ~/workspace/capi-release develop | ||
clone [email protected]:cloudfoundry/capi-env-pool.git ~/workspace/capi-env-pool | ||
disable_cred_hook ~/workspace/capi-env-pool | ||
clone [email protected]:cloudfoundry/capi-ci.git ~/workspace/capi-ci | ||
clone [email protected]:cloudfoundry/capi-dockerfiles.git ~/workspace/capi-dockerfiles | ||
clone [email protected]:cloudfoundry/capi-ci-private.git ~/workspace/capi-ci-private | ||
disable_cred_hook ~/workspace/capi-ci-private | ||
clone [email protected]:cloudfoundry/cf-deployment.git ~/workspace/cf-deployment | ||
clone [email protected]:cloudfoundry/cf-for-k8s.git ~/workspace/cf-for-k8s | ||
|
||
# clone golang repos and symlink them into the GOPATH | ||
clone [email protected]:cloudfoundry/cf-acceptance-tests.git ~/go/src/github.com/cloudfoundry/cf-acceptance-tests | ||
if [ ! -L ~/workspace/cf-acceptance-tests ]; then | ||
ln -sf $HOME/go/src/github.com/cloudfoundry/cf-acceptance-tests ~/workspace/cf-acceptance-tests | ||
fi | ||
|
||
clone [email protected]:cloudfoundry/sync-integration-tests.git ~/go/src/code.cloudfoundry.org/sync-integration-tests | ||
ln -sfn $HOME/go/src/code.cloudfoundry.org/sync-integration-tests ~/workspace/sync-integration-tests | ||
|
||
clone [email protected]:cloudfoundry/capi-bara-tests.git ~/go/src/github.com/cloudfoundry/capi-bara-tests | ||
if [ ! -L ~/workspace/capi-bara-tests ]; then | ||
ln -sf $HOME/go/src/github.com/cloudfoundry/capi-bara-tests ~/workspace/capi-bara-tests | ||
fi | ||
|
||
clone [email protected]:cloudfoundry/cli.git ~/go/src/code.cloudfoundry.org/cli | ||
if [ ! -L ~/workspace/cli ]; then | ||
ln -sf $HOME/go/src/code.cloudfoundry.org/cli/ ~/workspace/cli | ||
fi | ||
|
||
disable_cred_hook ~/workspace/capi-env-pool | ||
disable_cred_hook ~/workspace/capi-ci-private | ||
|
||
# clone golang repos and symlink them into the GOPATH | ||
ln -sf $HOME/go/src/github.com/cloudfoundry/cf-acceptance-tests ~/workspace/cf-acceptance-tests | ||
ln -sfn $HOME/go/src/code.cloudfoundry.org/sync-integration-tests ~/workspace/sync-integration-tests | ||
ln -sf $HOME/go/src/github.com/cloudfoundry/capi-bara-tests ~/workspace/capi-bara-tests | ||
ln -sf $HOME/go/src/code.cloudfoundry.org/cli/ ~/workspace/cli | ||
popd > /dev/null |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.