Closed eugeneromero closed 6 years ago
Thanks for reporting the bug. Will look into it.
Sorry about the double PR, forgot to switch to my personal account in the first PR (GitHub does not like my work email).
Since PR #129 was merged, this issue can be closed.
What I did: Included the
gocd::agent
recipe in my wrapper cookbook, with no overridden attributes:Then, ran a Windows 2012 R2 Kitchen suite to test agent install.
What I expected to happen: Gocd cookbook downloads the correct gocd agent package and installs it.
What actually happened: The
remote_file[go-agent-latest-setup.exe]
resource ingocd::agent_windows_install
fails with a 404:Cause: The URL for the Windows agent is wrong. Going to the GoCD download page, you can see the correct address is
https://download.gocd.org/binaries/17.7.0-5147/win/go-agent-17.7.0-5147-jre-64bit-setup.exe
(notice the -jre-64bit in the file name, there is also a 32bit version).Looking at the recipe, I see a source property, which uses the go_agent_package_url helper.
This helper in turn, uses the go_agent_remote_package_name helper. I believe this is the helper that needs to be modified to properly set the correct package names for Windows.
I would imagine this also happens with the GoCD server package, but have not tested it.
Possible Solution: By means of Ohai, check if Windows is 32 or 64 bit, and create the Windows download URL as needed.