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

Handle upgrading bootstrap-path from old 2.x shell script #580

Merged
merged 6 commits into from
Mar 14, 2018

Conversation

lox
Copy link
Contributor

@lox lox commented Nov 8, 2017

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.

@lox lox added wip and removed wip labels Nov 8, 2017
@lox lox requested a review from keithpitt November 8, 2017 06:24
Copy link
Contributor

@toolmantim toolmantim left a 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."
Copy link
Contributor

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"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👌🏻

Copy link
Member

Choose a reason for hiding this comment

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

@toolmantim toolmantim removed the request for review from keithpitt December 4, 2017 23:07
@lox lox added this to the v3.0.0 milestone Jan 16, 2018
@lox lox force-pushed the migrate-bootstrapsh-from-2-6 branch from c057497 to e5b4c62 Compare March 14, 2018 02:42
@lox lox requested a review from keithpitt March 14, 2018 06:22
@lox lox merged commit 419fa9d into master Mar 14, 2018
@lox lox deleted the migrate-bootstrapsh-from-2-6 branch March 14, 2018 08:12
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.

3 participants