Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not open input file: bin/automate #63

Closed
foxycode opened this issue Apr 3, 2024 · 2 comments
Closed

Could not open input file: bin/automate #63

foxycode opened this issue Apr 3, 2024 · 2 comments

Comments

@foxycode
Copy link

foxycode commented Apr 3, 2024

Automate is run without problem and deploy process is running until On deploy phase starts.

Automate is installed and run in Github Action:

curl -LSs https://www.automate-deployer.com/install | bash
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan -t rsa server1.cz > ~/.ssh/known_hosts
ssh-keyscan -t rsa server2.cz > ~/.ssh/known_hosts
echo "${{ inputs.deploy-key }}" > deploy.key
chmod 600 deploy.key
/home/runner/.automate/bin/automate deploy production

Runner output:

Run ./.github/actions/automate
Run curl -LSs https://www.automate-deployer.com/install | bash
   ___       __                  __
  / _ |__ __/ /____  __ _  ___ _/ /____
 / __ / // / __/ _ \/  ' \/ _ `/ __/ -_)
/_/ |_\_,_/\__/\___/_/_/_/\_,_/\__/\__/

Environment check
  [*] cURL is installed
  [*] Your OS (linux) is supported
  [*] Your architecture (amd64) is supported

Download
  Last release version... ok
  Downloading binary... ok
  Making the binary executable... ok
  Installing the binary... ok

The Automate v4.0.0 was installed successfully!

Install it globally on your system:
  mv /home/runner/.automate/bin/automate /usr/local/bin/automate

Don't forget to start a new shell to use Automate
Run mkdir ~/.ssh
# server1.cz:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11
# server2.cz:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11
Run echo "***

 [*] Start deployment                                                           

 ------------ ------------------------------------------ 
  Repository   github-monorepo:company/monorepo.git  
  Platform     production                                
  Servers      production-server1 (server1.cz)            
               production-server2 (server2.cz)            
  Version      master                                    
 ------------ ------------------------------------------ 

 [*] Prepare Release                                                            

 git clone github-monorepo:company/monorepo.git -q --recursive -b master .
 git clone github-monorepo:company/monorepo.git -q --recursive -b master .

 [*] Setting up shared items                                                    

 [production-server1] /home/web/company.cz/monorepo/releases/2024.04.03-2147.942/config/local.neon --> /home/web/company.cz/monorepo/shared/config/local.neon
 [production-server2] /home/web/company.cz/monorepo/releases/2024.04.03-2147.942/config/local.neon --> /home/web/company.cz/monorepo/shared/config/local.neon

 [*] On deploy                                                                  

 php8.3 /usr/local/bin/composer install --no-interaction --no-progress --no-dev --prefer-dist --no-ansi
 [production-server1]
 Could not open input file: bin/automate

Error: ]                                                                        

 [production-server1] move release to /home/web/company.cz/monorepo/releases/failed
 [production-server2] move release to /home/web/company.cz/monorepo/releases/failed

In DeployCommand.php line 71:
                     
  Deployment failed  
                     

deploy [-c|--config CONFIG] [-f|--force] [--] <platform> [<gitRef>]

Error: Process completed with exit code 1.

.automate.yml file

repository: github-monorepo:company/monorepo.git

platforms:
  production:
    default_branch: master
    max_releases: 3
    servers:
      production-server1:
        host: server1.cz
        user: web
        password: ''
        ssh_key: deploy.key
        path: /home/web/company.cz/monorepo
      production-server2:
        host: server2.cz
        user: web
        password: ''
        ssh_key: deploy.key
        path: /home/web/company.cz/monorepo

shared_files:
  - config/local.neon

on_deploy:
  - php8.3 /usr/local/bin/composer install --no-interaction --no-progress --no-dev --prefer-dist --no-ansi
  - HIGHCHARTS_VERSION=9.1.0 ACCEPT_HIGHCHARTS_LICENSE=1 npm install --silent --no-progress --prefix ./ highcharts-export-server@2.1.0

post_deploy:
  - cachetool opcache:reset --fcgi=127.0.0.1:9999 --tmp-dir=/tmp
  - cmd: redis-cli -n 0 FLUSHDB
    only: ["production-server1", "production-server2"]
julienj pushed a commit that referenced this issue Apr 4, 2024
@julienj
Copy link
Member

julienj commented Apr 4, 2024

Can you test it with version 4.0.1 ?

@foxycode
Copy link
Author

foxycode commented Apr 4, 2024

Also works fine with v4.0.1

@foxycode foxycode closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants