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

Release channels and staged releases for the manager #736

Merged
merged 14 commits into from Oct 1, 2020

Conversation

JonathanDCohen
Copy link
Contributor

This PR allows us to release a beta or alpha build of the manager by appending "-beta" or "-alpha" to the version field in the manager's package.json. It also allows us to perform a staged rollout by appending -s $rollout_percentage to the build command. This is similar to Jigsaw-Code/outline-apps#841 for the client.

This PR adds jq to parse package.json as a system dependency requirement for packaging or releasing the manager in order to parse package.json

README.md Outdated Show resolved Hide resolved
@@ -21,16 +21,48 @@ if [ "$CSC_LINK" == "unset" ]; then
exit 1
fi

function usage () {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we can we move this code to a separate script (i.e. get_packaging_opts.sh) and call it from all the scripts?

src/server_manager/scripts/manager_release_channel.sh Outdated Show resolved Hide resolved
Copy link
Contributor Author

@JonathanDCohen JonathanDCohen left a comment

Choose a reason for hiding this comment

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

PTAL. Note that I fixed a bug regarding staged releases of mainline releases: Beta channel users take updates from both the beta and the mainline channels. Therefore if we cut a staged rollout on the mainline we need to do the same for the beta channel.

src/server_manager/electron_app/release_macos_action.sh Outdated Show resolved Hide resolved
src/server_manager/scripts/manager_release_channel.sh Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/server_manager/scripts/get_packaging_opts.sh Outdated Show resolved Hide resolved
src/server_manager/scripts/manager_release_channel.sh Outdated Show resolved Hide resolved
Copy link
Contributor Author

@JonathanDCohen JonathanDCohen left a comment

Choose a reason for hiding this comment

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

renaming to get_manager_release_channel done in 3401fb7


# This breaks if we have more than one option. We could, for example, use jq here to return JSON
# and jq from the calling script to parse it to variables.
echo "${STAGING_PERCENTAGE}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This doesn't quite work as you propose, since subprocesses get a copy of the parent process' environment. I did some research, however, and found that scripts called with source run in the same process as the caller, and so can populate variables without them even needing to be exported to the environment at all! Thanks for the motivation to find a better solution ^_^

Done in 3ba6a3c

Copy link
Contributor

Choose a reason for hiding this comment

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

Glad my suggestion helped 😅

Copy link
Contributor

@alalamav alalamav left a comment

Choose a reason for hiding this comment

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

Thanks for the changes 👍

@JonathanDCohen JonathanDCohen merged commit a5d53bc into master Oct 1, 2020
@JonathanDCohen JonathanDCohen deleted the cohenjon-release-channels branch October 1, 2020 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants