Сценарий развертывания Python на битбакете конвейеров ошибка с Rsync

Я пытаюсь использовать сценарий Python, чтобы помочь мне при развертывании на конвейерах bitbucket. Это хорошо работает на моем Mac, но в контексте конвейера битовой памяти нет, возвращая следующее сообщение об ошибке:

+ python deploy.py
rsync: Failed to exec ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.1]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(226) [sender=3.1.1]
executing: rsync -avzH . --exclude .git/ sources/ -e ssh user@localhost.domain.org:/var/www/html/website/

Мои файлы

deploy.py

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import subprocess

server_user = "user"
server_host = "localhost.domain.org"
server_path = "/var/www/html/website/"

# Build RSync Command line
args = ["rsync", "-avzH", ".", "--exclude", ".git/ sources/", "-e", "ssh"]

args.append("%s@%s:%s"%(server_user, server_host, server_path))

# run rsync
subprocess.call(args)

print "executing: " + ' '.join(args)

Bitbucket-pipelines.yml

image: python:2.7.15-slim-jessie
pipelines:
  custom:
    deploy-qa:
    - step:
       deployment: test
       name: Deploy on QA Server
       caches:
        - node
       script:
        - apt-get update
        - apt-get -qq install rsync
        - python deploy.py

0 ответов

Другие вопросы по тегам