8. fix use ssh in ci script
This commit is contained in:
@ -1,17 +1,7 @@
|
|||||||
stages:
|
stages:
|
||||||
- hello
|
- hello
|
||||||
- testssh
|
|
||||||
- build
|
- 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:
|
job1:
|
||||||
stage: hello
|
stage: hello
|
||||||
@ -45,20 +35,20 @@ job3:
|
|||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
before_script:
|
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 update
|
||||||
- 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
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- make clean
|
- make clean
|
||||||
- make all
|
- make all
|
||||||
|
|
||||||
job4:
|
|
||||||
stage: testssh
|
|
||||||
tags:
|
|
||||||
- hottis
|
|
||||||
- linux
|
|
||||||
- debian
|
|
||||||
script:
|
|
||||||
- ssh git@gitlab.com
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user