Skip to content

Commit 667496e

Browse files
committed
Make command one-line.
1 parent ecb9e16 commit 667496e

1 file changed

Lines changed: 1 addition & 25 deletions

File tree

entrypoint.sh

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,7 @@ eval `ssh-agent -s`
2222

2323
ssh-add <(echo "$SSH_PRIVATE_KEY")
2424

25-
remote_command=<< EOF
26-
set -ex
27-
28-
log() {
29-
echo ">> [remote]" \$@
30-
}
31-
32-
cleanup() {
33-
log "Removing workspace..."
34-
rm -rf "\$HOME/workspace"
35-
}
36-
37-
log "Creating workspace directory..."
38-
mkdir "\$HOME/workspace"
39-
trap cleanup EXIT
40-
41-
log "Unpacking workspace..."
42-
tar -C "\$HOME/workspace" xjv
43-
44-
log "Launching docker-compose..."
45-
COMPOSE_PROJECT="$DOCKER_COMPOSE_PREFIX"
46-
COMPOSE_FILENAME="$DOCKER_COMPOSE_FILENAME"
47-
cd \$HOME/workspace
48-
docker-compose up -d
49-
EOF
25+
remote_command="set -ex ; log() { echo '>> [remote]' \$@ ; } ; cleanup() { log 'Removing workspace...'; rm -rf \"\$HOME/workspace\" } ; log 'Creating workspace directory...' ; mkdir \"\$HOME/workspace\" ; trap cleanup EXIT ; log 'Unpacking workspace...' ; tar -C \"\$HOME/workspace\" xjv ; log 'Launching docker-compose...' ; COMPOSE_PROJECT=\"$DOCKER_COMPOSE_PREFIX\" ; COMPOSE_FILENAME=\"$DOCKER_COMPOSE_FILENAME\" ; cd \"\$HOME/workspace\" ; docker-compose up -d"
5026

5127
echo ">> [local] Connecting to remote host."
5228
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \

0 commit comments

Comments
 (0)