Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent.sh doesn't find findJava.sh #18

Open
Sushisource opened this issue Jan 17, 2018 · 1 comment
Open

agent.sh doesn't find findJava.sh #18

Sushisource opened this issue Jan 17, 2018 · 1 comment

Comments

@Sushisource
Copy link

This is using the agent zip from 2017.1.2 - I'm using this Dockerfile with only some really minor modifications to add a few other requirements.

As fair as I can tell, this is simply because the agent.sh script tries to source findJava.sh as if it's guaranteed to be in the working directory, but that's not the case from this image.

[ec2-user@ip-10-176-72-238 dockerized-tc-agents]$ docker logs docker_tcagent_1
/run-services.sh
/run-agent.sh
Will create new buildAgent.properties using distributive
TeamCity URL is provided: http://betateamcityaws
Will prepare agent config
run agent.sh configure --server-url http://betateamcityaws --name ip-10-176-72-238_docker_tcagent_1
/opt/buildagent/bin/agent.sh: 142: .: findJava.sh: not found
Error! Stopping the script.

Indeed, it's fixable by chaging the line in agent.sh that calls findjava from

. findJava.sh

to

. ./findJava.sh

So I suppose this is really more of an issue with the agent bundle than this image

@kir
Copy link
Member

kir commented Oct 7, 2019

As I can see in the current sources, TeamCity uses . ./findJava.sh in the agent.sh script.
Probably the issue could be with a change of working directory after your modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants