8. fix use ssh in ci script
This commit is contained in:
@ -1,17 +1,7 @@
|
||||
stages:
|
||||
- hello
|
||||
- testssh
|
||||
- build
|
||||
|
||||
before_script:
|
||||
- echo "Prepare ssh environment"
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
- echo "Preparing ssh environment done"
|
||||
|
||||
job1:
|
||||
stage: hello
|
||||
@ -45,20 +35,20 @@ job3:
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
before_script:
|
||||
- echo "Prepare ssh environment"
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
- echo "Preparing ssh environment done"
|
||||
- apt update
|
||||
- apt install -y msp430-libc
|
||||
- apt install -y binutils-msp430
|
||||
- apt install -y gcc-msp430
|
||||
|
||||
script:
|
||||
- make clean
|
||||
- make all
|
||||
|
||||
job4:
|
||||
stage: testssh
|
||||
tags:
|
||||
- hottis
|
||||
- linux
|
||||
- debian
|
||||
script:
|
||||
- ssh git@gitlab.com
|
||||
|
||||
|
Reference in New Issue
Block a user