-
Notifications
You must be signed in to change notification settings - Fork 300
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
Handle upgrading bootstrap-path from old 2.x shell script #580
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I've added a comment about the deprecation warning… seeing as we're going to be showing this on 100% of upgraded agents.
# v2 configurations will still have bootstrap-path=/usr/share/buildkite-agent/bootstrap.sh | ||
# which will cause all sorts of wierd behaviour | ||
|
||
echo "+++ :warning: Your agent configuration contains an outdated bootstrap-path reference. It can be safely removed." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be great to make this a bit more useful. Do we have the path to the configuration file?
Maybe something like:
echo "+++ warning: Agent configuration file deprecation warning"
echo "Your agent configuration file references a bootstrap-script compatibility shim, which will be removed in Buildkite Agent 4.x+"
echo ""
echo "To fix this, remove the 'bootstrap-script' line from your agent configuration file located at:"
echo "/var/lib/buildkite-agent/buildkite-agent.cfg"
echo ""
echo "For more information, see our Buildkite Agent 3.0 upgrade guide:"
echo "https://buildkite.com/docs/agent/some-upgrade-doc"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c057497
to
e5b4c62
Compare
This adds a bootstrap.sh shim that gets installed at the same location as the old v2.x bootstrap that prints a warning and then runs
buildkite-agent bootstrap
. This should mean that users that upgrade from v2 -> v3 don't run into problems because their config still refers to the v2 bootstrap.sh.