Skip to content
Snippets Groups Projects
Commit cb75d442 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

add ssh key

parent 32b31bae
No related branches found
No related tags found
1 merge request!98Fault sections
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
#### ####
variables: variables:
FAULT_SECTIONS: nshm-fault-sections
FAULT_SECTIONS_GIT: https://gitlab-ci-token:${CI_JOB_TOKEN}@code.usgs.gov/ghsc/nshmp/${FAULT_SECTIONS}.git
JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html
JUNIT_FILES: build/test-results/test/TEST-*.xml JUNIT_FILES: build/test-results/test/TEST-*.xml
REPORTS_DIR: build/reports REPORTS_DIR: build/reports
...@@ -20,12 +18,14 @@ stages: ...@@ -20,12 +18,14 @@ stages:
#### ####
# Git clone nshm-fault-sections # Git clone nshm-fault-sections
#### ####
.fault-sections: .ssh-key:
before_script: before_script:
- cd .. - eval $(ssh-agent -s)
- rm -rf ${FAULT_SECTIONS} - mkdir -p ~/.ssh
- git clone ${FAULT_SECTIONS_GIT} - chmod 700 ~/.ssh
- cd ${CI_PROJECT_NAME} - echo "${SSH_PRIVATE_KEY}" >> ~/.ssh/id_rsa
- chmod 0600 ~/.ssh/id_rsa
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
#### ####
# GitLab runner tags # GitLab runner tags
...@@ -47,7 +47,7 @@ stages: ...@@ -47,7 +47,7 @@ stages:
#### ####
Build Project: Build Project:
extends: extends:
- .fault-sections - .ssh-key
- .gradle - .gradle
- .tags - .tags
stage: test stage: test
...@@ -115,7 +115,7 @@ Spotbugs Test: ...@@ -115,7 +115,7 @@ Spotbugs Test:
#### ####
Unit Tests: Unit Tests:
extends: extends:
- .fault-sections - .ssh-key
- .gradle - .gradle
- .tags - .tags
stage: test stage: test
......
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