• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Forwarded to devs Git deploy actions script not recognising end of if

captainhook

Basic Pleskian
Username:

TITLE

Git deploy actions script not recognising end of if

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian v18.0.52_build1800230516.12 os_RedHat el8, Rocky Linux 8.8 (Green Obsidian),

PROBLEM DESCRIPTION

Git deploy actions seems to not be parsing if statement correctly and causing deployment to fail.

STEPS TO REPRODUCE

  1. Add Git repo to site
  2. Modify deploy actions with code below
  3. Deploy the repository

Bash:
if [ "$remotehash" != "$localhash" ]; then
  echo "change found"
else
  echo "no change found, deploy skipped"
fi

ACTUAL RESULT

When I hit deploy, I see the following error:
/bin/sh: -c: line 1: syntax error: unexpected end of file

EXPECTED RESULT

The deployment should not fail.

ANY ADDITIONAL INFORMATION

(DID NOT ANSWER QUESTION)

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Could you please explain where exactly the deploy actions are modified? E.g. in which file or dialog?
 
Hi Peter,

The deploy actions are modified under domain > Git > Repository Settings > Deploy actions

To my knowledge, this is the only place deploy actions are set.
 
According to developers the product issue is already known in the scope of another issue. The recommended workaround is to switch the domain to /bin/bash shell and to put additional actions into the bash script. Then call this script from "additional deployment actions". Internal ID EXTGIT-22.
 
Back
Top