Add job to stop branch environments

3 jobs for branch-test in 55 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Build
passed #79
build

00:00:16

 
  Deploy
passed #80
deploy_branch

00:00:21

failed #81
allowed to fail manual
stop_branch

00:00:17

 
Name Stage Failure
failed
stop_branch Deploy
$ chmod 700 ~/.ssh
$ echo "$SSH_HOST_KEY" > ~/.ssh/known_hosts
$ chmod 644 ~/.ssh/known_hosts
$ echo "$SSH_CONFIG" > ~/.ssh/config
$ chmod 644 ~/.ssh/config
$ ssh "$SSH_BRANCH_DEPLOY_HOST" "rm -r $SSH_BRANCH_DEPLOY_PATH/$CI_COMMIT_REF_SLUG"
Warning: Permanently added the ECDSA host key for IP address '[45.56.76.228]:9022' to the list of known hosts.
Permission denied (publickey).
ERROR: Job failed: exit code 1