nithin
nithin

Reputation: 401

Jenkins ecs Command not found

I installed third party tool (ecs deploy using pip install ecs-deploy) .When I try to deploy using command ecs deploy demo-cluster demo-service in command prompt its working fine when I try with jenkins to deploy getting error

/tmp/jenkins5062380414579854312.sh: line 13: ecs: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Upvotes: 0

Views: 544

Answers (2)

Rodrigo Murillo
Rodrigo Murillo

Reputation: 13640

The Jenkins service runs typically runs under the user jenkins.

You have installed the package as the ec2-user. This means the jenkins user may not have the package in its own path or have correct permissions to execute the file.

You can correct this one of two ways:

  1. Use sudo to elevate permissions and install it globally. Set the path in /etc/environment
  2. Interactively login as the jenkins user and install under that account.

Upvotes: 1

Yann
Yann

Reputation: 2532

You need to run the full AWS CLI command:

aws ecs deploy --cluster demo-cluster --service demo-service

Upvotes: 0

Related Questions