accept macos host as a env-var with a default
This commit is contained in:
parent
77cd7f8e13
commit
88288a1819
|
@ -14,17 +14,19 @@ fi
|
||||||
TMP_WORKSPACE="/tmp/nomad-workspace/$(date +%Y-%m-%d-%s)"
|
TMP_WORKSPACE="/tmp/nomad-workspace/$(date +%Y-%m-%d-%s)"
|
||||||
REPO_REMOTE_PATH="${TMP_WORKSPACE}/gopath/src/github.com/hashicorp/nomad"
|
REPO_REMOTE_PATH="${TMP_WORKSPACE}/gopath/src/github.com/hashicorp/nomad"
|
||||||
|
|
||||||
|
readonly remote_macos_host=${REMOTE_MACOS_HOST:-sharedmac-bot}
|
||||||
|
|
||||||
echo "Using temp workspace: ${TMP_WORKSPACE}"
|
echo "Using temp workspace: ${TMP_WORKSPACE}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo '=======>>>> Transfering repository'
|
echo '=======>>>> Transfering repository'
|
||||||
ssh sharedmac-bot mkdir -p "${REPO_REMOTE_PATH}"
|
ssh ${remote_macos_host} mkdir -p "${REPO_REMOTE_PATH}"
|
||||||
rsync -az \
|
rsync -az \
|
||||||
"${REPO}/.git" \
|
"${REPO}/.git" \
|
||||||
"sharedmac-bot:${REPO_REMOTE_PATH}"
|
"${remote_macos_host}:${REPO_REMOTE_PATH}"
|
||||||
|
|
||||||
echo '=======>>>> Compiling Mac Binaries'
|
echo '=======>>>> Compiling Mac Binaries'
|
||||||
cat <<'EOF' | ssh sharedmac-bot /bin/bash -s "${TMP_WORKSPACE}"
|
cat <<'EOF' | ssh ${remote_macos_host} /bin/bash -s "${TMP_WORKSPACE}"
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
@ -68,6 +70,6 @@ compile
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo '=======>>>> Retreiving mac compiled binaries'
|
echo '=======>>>> Retreiving mac compiled binaries'
|
||||||
rsync -avz --ignore-existing sharedmac-bot:"${REPO_REMOTE_PATH}/pkg/" "${REPO}/pkg"
|
rsync -avz --ignore-existing ${remote_macos_host}:"${REPO_REMOTE_PATH}/pkg/" "${REPO}/pkg"
|
||||||
|
|
||||||
ssh sharedmac-bot rm -rf "${TMP_WORKSPACE}"
|
ssh ${remote_macos_host} rm -rf "${TMP_WORKSPACE}"
|
||||||
|
|
Loading…
Reference in New Issue