Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Conversation

@mxstbr
Copy link
Contributor

@mxstbr mxstbr commented May 30, 2018

Status

  • WIP
  • Ready for review
  • Needs testing

This sets up continuous deployment for the desktop app. The way this works is as follows:

  1. We merge the latest changes from alpha to production
  2. This prompts a CircleCI build, which packages all the apps and uploads them to GitHub as a draft release that looks like this:

screen shot 2018-05-30 at 15 42 22

  1. Test the app locally, if you're happy with how it works click the "Edit" button on the draft release and you get to this screen:

screenshot-2018-5-30 withspectrum spectrum

  1. Fill out the title and release notes of the release (like I've already done above), then click "Publish release"

This is what it'll look like once published: https://github.com/withspectrum/spectrum/releases/tag/v1.0.0-beta.1 As soon as it's published, the app will prompt existing users to upgrade to the newest version and download and install it for them.

Note: I haven't been able to test the CI part of this whole thing, but from my local testing (which is how I generated the release above) it should work!

@brianlovin
Copy link
Contributor

Thank you so much for digging in here! Small favor: could you add these instructions to the docs?

@brianlovin brianlovin merged commit da89eeb into alpha May 30, 2018
@brianlovin brianlovin deleted the desktop-release-process branch May 30, 2018 17:36
@brianlovin
Copy link
Contributor

@mxstbr afaik this is not working:

screenshot 2018-05-30 11 33 13

The CI pipeline never runs

https://circleci.com/gh/withspectrum/spectrum/7520

@brianlovin
Copy link
Contributor

I'm not sure if we want to disable that 'only build pull requests' option though, otherwise our ci queue will blow up - right?

@brianlovin
Copy link
Contributor

I am going to try and run that job manually

@mxstbr
Copy link
Contributor Author

mxstbr commented May 30, 2018

Ahhh damn fuck. Why does the CD for alpha work then?

@brianlovin
Copy link
Contributor

Not sure :/ Anyways, I am going to do a manual release to at least test the auto updater!

@brianlovin
Copy link
Contributor

FYI:
screenshot 2018-05-30 11 51 37

Digging into a fix, but we'll need to add docs for this, too

@brianlovin
Copy link
Contributor

Just needed to set GH_TOKEN as an env var before running release - not sure how this will work from CI

@brianlovin
Copy link
Contributor

Release published: https://github.com/withspectrum/spectrum/releases/tag/v1.0.0-beta.2 - we'll see if the autoupdater works!

@brianlovin
Copy link
Contributor

That release is published - I closed and re-started the Spectrum app and it did not trigger an autoupdate (or at least it didn't detect one from the releases)

@mxstbr
Copy link
Contributor Author

mxstbr commented May 30, 2018

GH_TOKEN is set in CI already

@mxstbr
Copy link
Contributor Author

mxstbr commented May 30, 2018

Hmm I haven't gotten an auto update notification either 😕

@mxstbr mxstbr mentioned this pull request May 31, 2018
3 tasks
@mxstbr
Copy link
Contributor Author

mxstbr commented May 31, 2018

Aha! This is what I found in the CircleCI docs, which is why the alpha CD works:

Note: For your default branch, we will always build all commits.

You know what we should do? This is a pretty simple fix: just do the desktop CD from the alpha branch. Since it won't actually be published until you publish the release on GitHub that should be perfectly fine.

mxstbr added a commit that referenced this pull request May 31, 2018
As @brianlovin noticed in #3199, the CD for the desktop app wasn't
working because CircleCI only runs builds for commits that are
associated with a PR.

While we could set CircleCI to run builds for all branches, that's a
very suboptimal solution as it would run a ton of unnecessary builds.

I came to wondering, why does the CD for alpha work if it doesn't build
branches? Hidden in the CircleCI docs I found this snippet:

> Note: For your default branch, we will always build all commits.

Which explains why alpha CD works, but production CD doesn't.

This patch is a very simple solution to this problem: we run desktop CD
on the alpha branch. That is fine because the desktop CD only creates a
draft GitHub release and we have to manually publish that release for
anybody to get the update, so it doesn't matter if we CD from alpha or
production!
@mxstbr mxstbr mentioned this pull request May 31, 2018
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants