Skip to content
Snippets Groups Projects
Commit b32a8ec4 authored by Seblu's avatar Seblu
Browse files

Workaround trap not executed in gitlab-ci

parent ae1424b7
No related branches found
No related tags found
No related merge requests found
Pipeline #155 passed with stage
in 7 seconds
......@@ -14,7 +14,11 @@ commitpkg:
stage: deploy
script:
- eval $(ssh-agent -s)
- trap 'kill $SSH_AGENT_PID' 0
# - trap "kill $SSH_AGENT_PID" 0
# trap is broken in gitlab runner, see:
# https://gitlab.com/gitlab-org/gitlab-runner/issues/3009
# use a workaournd with sleep and kill:
- sleep 300 && kill "$SSH_AGENT_PID" & disown
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- seblu-push
only:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment