14 lines
334 B
YAML
14 lines
334 B
YAML
stages:
|
|
- build
|
|
|
|
build:
|
|
image: alpine:latest
|
|
stage: build
|
|
script:
|
|
- apk add --no-cache openssh
|
|
- mkdir -p ~/.ssh
|
|
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
- ssh-keyscan 192.168.1.87 >> ~/.ssh/known_hosts
|
|
- ssh -i ~/.ssh/id_rsa kerboul@192.168.1.87 'echo "Connexion réussie"'
|