Skip to content

Instantly share code, notes, and snippets.

@BlackDante
Last active February 9, 2017 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BlackDante/bc6ed7eb57d00b73ea577d46173e368f to your computer and use it in GitHub Desktop.
Save BlackDante/bc6ed7eb57d00b73ea577d46173e368f to your computer and use it in GitHub Desktop.
image: node:6.9.4
before_script:
# install ssh-agent
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# run ssh-agent
- eval $(ssh-agent -s)
# add ssh key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$SSH_KEY")
# disable host key checking (NOTE: makes you susceptible to man-in-the-middle attacks)
# WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
all_tests:
script:
- npm install
- npm run test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment