refined-addition-53644
03/20/2023, 2:43 PMscie-pants
in our CI/CD pipeline which runs inside a docker container on AWS.
Even after modifying the PATH with ~/bin
, pants is not found. What am I missing? I run these commands
"export PATH=$PATH:~/bin"
"./get-pants.sh"
"pants --version"
This is the log from the container
[Container] 2023/03/20 11:28:34 Running command export PATH=$PATH:~/bin
[Container] 2023/03/20 11:28:34 Running command ./get-pants.sh
Downloading and installing the pants launcher ...
Installed the pants launcher from <https://github.com/pantsbuild/scie-pants/releases/latest/download/scie-pants-linux-x86_64> to /root/bin/pants
Running `pants` in a Pants-enabled repo will use the version of Pants configured for that repo.
In a repo not yet Pants-enabled, it will prompt you to set up Pants for that repo.
[Container] 2023/03/20 11:28:35 Running command pants --version
/codebuild/output/tmp/script.sh: 4: pants: not found
refined-addition-53644
03/20/2023, 2:48 PMroot
is the ~
as mentioned here
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.htmlenough-analyst-54434
03/20/2023, 2:49 PMenough-analyst-54434
03/20/2023, 2:51 PMpants
like /root/bin/pants
. In short, there is absolutely no magic at all here. This is just placing a binary on the filesystem.enough-analyst-54434
03/20/2023, 2:55 PMexport ...
. For that to work the ambient shell must be bash and the following lines must all run in that same shell session. Maybe that's not the case?refined-addition-53644
03/20/2023, 2:57 PM/usr/local/bin/
being available. What option should I use to install directly there?enough-analyst-54434
03/20/2023, 2:58 PMenough-analyst-54434
03/20/2023, 2:58 PMrefined-addition-53644
03/20/2023, 2:58 PMrefined-addition-53644
03/20/2023, 2:59 PM--bin-dir
or -d
refined-addition-53644
03/20/2023, 3:00 PMenough-analyst-54434
03/20/2023, 3:01 PMrefined-addition-53644
03/20/2023, 3:02 PMrefined-addition-53644
03/20/2023, 3:12 PMenough-analyst-54434
03/20/2023, 3:12 PMrefined-addition-53644
03/20/2023, 3:13 PM