Send build artifacts via SSH - failed to create directory

I am trying to deploy an automation process pushing changes from jenkins to aws. The problem is that in the GIT repository I have two folders, one - docrootand the other - database. I need docrootto go to /var/www/html, and currently the database should be ignored.

As a test run, I am trying to make the following settings:

Settings 1:

Post Build Actions

In the carry set

Source files: **/*
Remove prefix: empty
Remote directory: empty
Exec command: pwd

Result: ERROR: Publish exception, exception message [Failed to create or modify directory. Catalog [database]] The build step "Send build artifacts over SSH" changed the build result to UNSTABLE Finished: UNSTABLE

Settings 2 :

Post Build Actions

In the carry set

Source files: **/*
Remove prefix: empty
Remote directory: /var/www/html
Exec command: pwd

: : , [ . [var]] " SSH" UNSTABLE : UNSTABLE

, , - ...

+4
1

, , SSH, , , . , Advanced... , - :

Enable verbose output

, :

ERROR: Exception when publishing, exception message [Could not create or change to directory. Directory [var]]
Build step 'Send files or execute commands over SSH' changed build result to UNSTABLE

- :

SSH: Connecting from host [some.host]
SSH: Connecting with configuration [Some Configuration] ...
SSH: Creating session: username [user], hostname [x.x.x.x], port [22]
SSH: Connecting session ...
...
SSH: cd [/var/lib/module/]
SSH: OK
SSH: mkdir [var]
SSH: FAILED: Message [Permission denied]

, .

- , Remote directory, :

Optional destination folder.

This folder will be below the one in the global configuration, if present.
The folder will be created if does not exist.

, , pwd , , , .

, , , , :

Manage Jenkins -> Configure System -> Publish over SSH

Remote directory:

enter image description here

, /home/sophie, /home/sophie/var/www/html, , .

+4

Source: https://habr.com/ru/post/1648879/


All Articles