Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

NPM does not work if macagent starts from plist

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.

1 answer

0 votes
Danyal Iqbal Community Leader Feb 16, 2021

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>

source: https://confluence.atlassian.com/bamkb/configuring-bamboo-to-start-automatically-on-startup-on-mac-os-x-302812729.html

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)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

59 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you