download-git-repo
Version:
Download and extract a git repository (GitHub, GitLab, Bitbucket) from node.
20 lines (18 loc) • 537 B
YAML
before_script:
- 'which ssh-agent || (apt-get update -y && apt-get install openssh-client -y)'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
- ssh-keyscan -t rsa bitbucket.org >> ~/.ssh/known_hosts
test:
stage: test
image: node:10.14.1
script:
- node --version
- npm --version
- npm install
- npm run lint
- npm run test