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

Add tests exposing a paths issue. #881

Merged
merged 2 commits into from Jan 2, 2019

Conversation

petemounce
Copy link
Contributor

On windows, absolute paths start either with \ or with c: (as in, drive-letter then colon)

Peter Mounce added 2 commits December 21, 2018 13:14
On windows, absolute paths start either with \ or with c: (as in, drive-letter then colon)
@@ -3,7 +3,7 @@
We frequently introduce new experimental features to the agent. You can use the `--experiment` flag to opt-in to them and test them out:

```bash
buildkite-agent start --experiment experiment1 --experiment expertiment2
buildkite-agent start --experiment experiment1 --experiment experiment2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅

@lox
Copy link
Contributor

lox commented Dec 22, 2018

Thanks @petemounce, we've still got a lot of little quirks to work out with windows paths. Assuming this test will fail?

@petemounce
Copy link
Contributor Author

@lox yes - https://forum.buildkite.community/t/bug-config-on-windows-doesnt-do-what-i-thought/182/3

Sorry, should have replicated that post here. I run the agent with NSSM, configured like:

nssm dump buildkite-agent

nssm.exe install buildkite-agent "c:/program files/buildkite-agent/buildkite-agent.exe"
nssm.exe set buildkite-agent AppParameters "start --config 'c:\programdata\buildkite-agent\buildkite-agent.cfg'"
nssm.exe set buildkite-agent AppDirectory "C:\program files\buildkite-agent"
nssm.exe set buildkite-agent AppExit Default Restart
nssm.exe set buildkite-agent AppStdout c:/programdata/buildkite-agent/buildkite-agent.log
nssm.exe set buildkite-agent AppStdoutCreationDisposition 2
nssm.exe set buildkite-agent AppStderr c:/programdata/buildkite-agent/buildkite-agent.log
nssm.exe set buildkite-agent AppStderrCreationDisposition 2
nssm.exe set buildkite-agent AppRotateFiles 1
nssm.exe set buildkite-agent AppRotateOnline 0
nssm.exe set buildkite-agent AppRotateSeconds 86400
nssm.exe set buildkite-agent AppRotateBytes 104858
nssm.exe set buildkite-agent DependOnService :buildkite-registration
nssm.exe set buildkite-agent DisplayName buildkite-agent
nssm.exe set buildkite-agent Environment :BUILDKITE_AGENT_TOKEN={redacted}
nssm.exe set buildkite-agent ObjectName .\buildkite-agent "****"
nssm.exe set buildkite-agent Start SERVICE_AUTO_START
nssm.exe set buildkite-agent Type SERVICE_WIN32_OWN_PROCESS

I see a fatal error in the log file:

2018-12-21 00:09:31 FATAL  A configuration file could not be found at: "C:\\program files\\buildkite-agent\\'c:\\programdata\\buildkite-agent\\buildkite-agent.cfg'"

petemounce added a commit to improbable-eng/ansible-buildkite-agent that referenced this pull request Dec 25, 2018
Works around buildkite-agent absolute path problem - doesn't understand drive-rooted paths on windows. See also buildkite/agent#881.

Makes the start parameters configurable. Also delete the configuration file from the zip file, because the agent prefers to find its configuration next-door to the binary ahead of any of the search paths, and if the stub is in place it'll use that in preference to our rendered version.
@lox
Copy link
Contributor

lox commented Jan 2, 2019

I'm going to merge this and then fix it, thanks @petemounce.

@lox lox merged commit c8bc0f0 into buildkite:master Jan 2, 2019
lox added a commit that referenced this pull request Jan 13, 2019
lox added a commit that referenced this pull request Jan 14, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants