• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Forwarded to devs Git "additional deployment actions" sometimes not working

Martin.H

Regular Pleskian
Username: Martin.H

TITLE

Git "additional deployment actions" sometimes not working

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Debian 10.7

PROBLEM DESCRIPTION

My additional commands (or here called "additional deployment actions") are not always executed after a commit. That breaks my Auto-Deploy setup.

STEPS TO REPRODUCE

  1. Create a application that you place into "httpdocs/www/"
  2. set up Git and set deploy path to "httpdocs/www/"
  3. add additional commands like "yarn all" which you mapped to:
    Code:
    "scripts": {
        "build": "hugo",
        "clearCache": "yarn cfcli -c .cfcli.yml purge",
        "all": "yarn install && yarn grunt && yarn build && yarn clearCache"
    },
  4. now push a testcommit
  5. for debug change "yarn all" to "yarn all 2>&1 > output.log" which will create a log (which is empty..)

ACTUAL RESULT

The testcommit will be successfully captured by Plesks Git extension but no commands will be triggered.

EXPECTED RESULT

Not just capture the testcommit, but also trigger the expected function in the desired folder

ANY ADDITIONAL INFORMATION

Sometimes it works if I set the comand to "yarn install" but as soon as anything else is included it breaks and do not trigger anything.

But if I log into SSH ALL the commands are working fine!

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
@Martin.H


Hello,

i suggest you to do the following steps for debugging your issue:

1 First of all you should check that deployment actions really work on server.
You can add the following command:
Code:
touch ~/test.txt

2 I'm not aware of the way how you installed node & yarn package to your server & how you made yarn available as alias 'yarn' (Looks like you've exported it to PATH variable)

I've checked your issue using a node.js installed with Node JS Plesk extension.

I used repository with package.json and following command:
Code:
/opt/plesk/node/12/bin/npm run test
Then i exported nodeto PATH by
Code:
export PATH=/opt/plesk/node/12/bin
and specify command like this:
Code:
npm run test

Both variants works fine.

You can make an "test.sh" script where all necessary commands will be execuded, on by one.
Deployment action string will be the following:
Code:
sh ~/test.sh > output.log

This solution should help you to find a root cause.
 
@Martin.H I'm experiencing the exact same issue. Did you mange to solve it?

My additional deployment actions are as follows
/opt/plesk/node/14/bin/npm ci --scripts-prepend-node-path NODE_ENV=production /opt/plesk/node/14/bin/npm run build --scripts-prepend-node-path touch ./tmp/restart.txt

@cepesh84 I followed this blog post. Nothing wrong with that right?

Plesk version:
Product: Plesk Obsidian 18.0.37 Update #2, last updated on Aug 11, 2021 06:26 AM
 
@Martin.H I'm experiencing the exact same issue. Did you mange to solve it?

My additional deployment actions are as follows
/opt/plesk/node/14/bin/npm ci --scripts-prepend-node-path NODE_ENV=production /opt/plesk/node/14/bin/npm run build --scripts-prepend-node-path touch ./tmp/restart.txt

@cepesh84 I followed this blog post. Nothing wrong with that right?

Plesk version:
Product: Plesk Obsidian 18.0.37 Update #2, last updated on Aug 11, 2021 06:26 AM
important, you had to enable ssh access for the user...
 
Back
Top