How to pass the PATH variable to Bamboo when running it as a systemd service in RedHat Enterprise Linux 7

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く


問題

When running Bamboo as a systemd service in RedHat Enterprise Linux (RHEL) 7 the PATH variable will not be automatically inherited by the Bamboo process.

This happens due to an OS restriction since systemd will not pass the PATH variable available for that user to any process started from it unless you explicitly pass the variable.

ソリューション

Add and environment directive to your service passing the PATH values you want:


1. Edit the systemd configuration file for Bamboo

vi /usr/lib/systemd/system/bamboo.service

2. Add the following environment directive:

Environment=PATH=/opt/location_of_your_executable

3. Reload Daemon

systemctl daemon-reload

4. Restart Bamboo

systemctl stop bamboo; systemctl start bamboo

最終更新日: 2021 年 10 月 27 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.