deploy

Bartolomeo Amico's Avatar

Bartolomeo Amico

20 Aug, 2020 12:16 PM

Hi, i have a problem with the after_deploy and before_deploy scripts. I try to execute a sh script both from the deployments tab and from the configuration on yml file, but in none of the cases they are executed. Are there any restrictions on running sh scripts?

  1. Support Staff 1 Posted by Feodor Fitsner on 21 Aug, 2020 08:12 PM

    Feodor Fitsner's Avatar

    Hi Bartolomeo,

    Sh scripts are running in Linux builds only. However, you should be able to choose Cmd and run your script with .sh extension "as is".

  2. 2 Posted by Bartolomeo Amic... on 24 Aug, 2020 09:44 AM

    Bartolomeo Amico's Avatar

    Hi Feodor.

    So I just have to put such a string in my yaml file?
    before_deploy
      - cmd: path_of_my_script.sh
    My script should be hosted wherever i want?
    Thanks for the reply

  3. Support Staff 3 Posted by Feodor Fitsner on 24 Aug, 2020 06:03 PM

    Feodor Fitsner's Avatar

    Hi Bartolomeo,

    Deployment script should be in the repository.

  4. 4 Posted by Bartolomeo Amic... on 26 Aug, 2020 09:27 AM

    Bartolomeo Amico's Avatar

    Hi Feodor.
    i put my sh script on the repository project, but when i try to execute in after_deploy step, with the cmd tag, i recieve an error code 127. Can you support me on this?
    Thank you

  5. Support Staff 5 Posted by Feodor Fitsner on 26 Aug, 2020 11:38 PM

    Feodor Fitsner's Avatar

    It must be something wrong with the script itself. Here I'm running test.sh before deploy and it works: https://ci.appveyor.com/project/FeodorFitsner/simple-console/builds...

    before_deploy:
    - cmd: test.sh
    
  6. Feodor Fitsner closed this discussion on 27 Oct, 2020 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac