Hello,
I created a Plist so that my mac remote agent can start automatically, but if the macagent starts through the plist it says that npm is not available. If I start the macagent manually the npm works fine.
The plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.atlassian.bamboo-agent</string>
<key>ProgramArguments</key>
<array>
<string>/Users/name/bamboo-agent-home/bin/bamboo-agent.sh</string>
<string>console</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>UserName</key>
<string>name</string>
</dict>
</plist>
I would like to know what to change in my plist file so that npm works.
services have user scopes. you can run npm but your service cannot. Try this:
make sure to use the needed username instead of 'USERNAME_RUNNING_BAMBOO' and specify the correct path to the start-bamboo.sh (BAMBOO_INSTALLATION_PATH).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.atlassian.bamboo</string>
<key>UserName</key>
<string>USERNAME_RUNNING_BAMBOO</string>
<key>ProgramArguments</key>
<array>
<string>BAMBOO_INSTALLATION_PATH/start-bamboo.sh</string>
<string>-fg</string>
</array>
<key>SessionCreate</key>
<true/>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Hello,
Thanks for your reply. The only difference I can see is this:
<string>-fg</string>
<key>SessionCreate</key>
<true/>
The macagent is able to start through the plist, but NPM is not working. I can also see that the remote agent is online/idle.
I first tried to follow the documentation from Confluence, but we have to run it in launchagent, and it was not working(not even getting the remote agent online with that documentation). So I followed this documentation: https://mgrebenets.github.io/mobile%20ci/2015/02/01/bamboo-remote-agent
(I only followed the launchagent part, because we have a correctly configured remote agent)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.