Add job to stop branch environments

3 jobs for branch-test in 53 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #76
build

00:00:17

 
  Deploy
passed #77
deploy_branch

00:00:18

failed #78
allowed to fail manual
stop_branch

00:00:18

 
Name Stage Failure
failed
stop_branch Deploy
$ echo "$SSH_CONFIG" > ~/.ssh/config
$ chmod 644 ~/.ssh/config
$ which ssh || ( apt-get update -y && apt-get install ssh -y )
/usr/bin/ssh
$ REMOTE="$(echo $SSH_BRANCH_DEPLOY_DEST | cut -d':' -f1)"
$ PATH="$(echo $SSH_BRANCH_DEPLOY_DEST | cut -d':' -f2)"
$ ssh "$REMOTE" "rm -r $PATH"
/bin/bash: line 104: ssh: command not found
ERROR: Job failed: exit code 1