Skip to content
Snippets Groups Projects
Commit cf24ba90 authored by Alexandre Gravereaux's avatar Alexandre Gravereaux
Browse files

fix-deploy-initial

parent 07ab43ea
No related branches found
No related tags found
No related merge requests found
Pipeline #53976 failed
...@@ -46,26 +46,14 @@ deploy: ...@@ -46,26 +46,14 @@ deploy:
variables: variables:
SSH_KEY: "$SSH_PRIVATE_KEY" SSH_KEY: "$SSH_PRIVATE_KEY"
DOMAIN: 138.195.139.69 DOMAIN: 138.195.139.69
# before_script:
# - 'which ssh-agent || ( apk update && apk add openssh-client )'
# - mkdir -p ~/.ssh
# - echo "$SSH_KEY" | tr -d '\n' > ~/.ssh/id_ed25519
# - chmod 600 -R ~/.ssh
# - eval $(ssh-agent -s)
# - ssh-add ~/.ssh/id_ed25519 # erreur de libcrypto avec l'agent ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
before_script: before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client wget gnupg -y )' - 'which ssh-agent || ( apk update && apk add openssh-client )'
- wget -qO- https://get.docker.com/gpg | apt-key add -
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- touch ~/.ssh/config - echo "$SSH_KEY" | tr -d '\n' > ~/.ssh/id_ed25519
- touch ~/.ssh/known_hosts - chmod 600 -R ~/.ssh
- chmod -R 400 ~/.ssh - eval $(ssh-agent -s)
- ssh-keyscan <ip> >> ~/.ssh/known_hosts - ssh-add ~/.ssh/id_ed25519 # erreur de libcrypto avec l'agent ssh
- '[[ -f /.dockerinit ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script: script:
- ssh debian@$DOMAIN " - ssh debian@$DOMAIN "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment