fix use ssh in ci script
This commit is contained in:
@ -2,6 +2,16 @@ stages:
|
|||||||
- hello
|
- hello
|
||||||
- build
|
- build
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- echo "Prepare ssh environment"
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | 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:
|
job1:
|
||||||
stage: hello
|
stage: hello
|
||||||
tags:
|
tags:
|
||||||
@ -38,12 +48,6 @@ job3:
|
|||||||
- apt install -y msp430-libc
|
- apt install -y msp430-libc
|
||||||
- apt install -y binutils-msp430
|
- apt install -y binutils-msp430
|
||||||
- apt install -y gcc-msp430
|
- apt install -y gcc-msp430
|
||||||
- eval $(ssh-agent -s)
|
|
||||||
- echo "$SSH_PRIVATE_KEY" | ssh-add
|
|
||||||
- mkdir -p ~/.ssh
|
|
||||||
- chmod 700 ~/.ssh
|
|
||||||
- ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
|
||||||
- chmod 644 ~/.ssh/known_hosts
|
|
||||||
script:
|
script:
|
||||||
- make clean
|
- make clean
|
||||||
- make all
|
- make all
|
||||||
|
Reference in New Issue
Block a user