This repository has been archived by the owner on Aug 1, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initially we wanted to fully automate releases and build artifact uploads, but as @kim pointed out it might be a security hazard and also might mislead people into thinking this is an official production release. So until we have the proper infrastructure in place to securely automate releases, we'll do them manually. It's worth mentioning that the releases are meant for our own internal evaluation only as the app is still in prototype stage. For this I added a warning in the readme. * Configure electron-builder release * Build both platforms in parallel * Add author and description * Explicitly spell out Linux package types * Build macOS only for master * Update README * chore(release): 0.0.2 * Remove publish steps * Extract development related documentation * Fix link * Improve wording * Update contact info * Automate releases Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
- Loading branch information
Showing
8 changed files
with
1,140 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,25 @@ | ||
.test_linux: &test_linux | ||
label: 'Test and package app on Linux' | ||
agents: | ||
production: "true" | ||
platform: "linux" | ||
timeout_in_minutes: 60 | ||
env: | ||
DOCKER_IMAGE: 'gcr.io/opensourcecoin/radicle-upstream:0.2.1' | ||
SHARED_MASTER_CACHE: true | ||
command: '.buildkite/run.sh' | ||
artifact_paths: | ||
- "app/dist/*.AppImage" | ||
- "app/dist/*.snap" | ||
- "app/cypress/screenshots/**/*.png" | ||
|
||
.test_macos: &test_macos | ||
label: 'Test and package app on macOS' | ||
agents: | ||
production: "false" | ||
platform: "macos" | ||
timeout_in_minutes: 60 | ||
command: '.buildkite/run.sh' | ||
artifact_paths: | ||
- "app/dist/*.dmg" | ||
- "app/cypress/screenshots/**/*.png" | ||
|
||
steps: | ||
- branches: master | ||
concurrency: 1 | ||
concurrency_group: master | ||
<<: *test_linux | ||
<<: *test_macos | ||
- branches: "!master" | ||
<<: *test_linux | ||
- label: 'Test and package app on Linux' | ||
command: '.buildkite/run.sh' | ||
agents: | ||
production: "true" | ||
platform: "linux" | ||
timeout_in_minutes: 60 | ||
env: | ||
DOCKER_IMAGE: 'gcr.io/opensourcecoin/radicle-upstream:0.2.1' | ||
SHARED_MASTER_CACHE: true | ||
artifact_paths: | ||
- "app/dist/*.AppImage" | ||
- "app/dist/*.snap" | ||
- "app/cypress/screenshots/**/*.png" | ||
|
||
- label: 'Test and package app on macOS' | ||
if: build.branch == 'master' | ||
command: '.buildkite/run.sh' | ||
agents: | ||
production: "false" | ||
platform: "macos" | ||
timeout_in_minutes: 60 | ||
artifact_paths: | ||
- "app/dist/*.dmg" | ||
- "app/cypress/screenshots/**/*.png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
## Development | ||
|
||
Our current workflow is to put our changes in feature branches which get | ||
submitted for review on GitHub as pull requests. Ideally a pull request is | ||
small and changes only one aspect of the code at a time. After a pull request | ||
is reviewed by at least one peer and passes all tests it can be squash-merged | ||
into master. | ||
|
||
To automate our release process as much as possible we're using | ||
[Standard Version][sv] and commits on master should be formatted according to | ||
the [conventional commits specification][ccs]. | ||
|
||
Here are a couple of examples: | ||
|
||
chore: remove leftover error mod reference (#74) | ||
fix: improve project creation validations (#76) | ||
feat: project creation (#70) | ||
|
||
The pull request ref goes in brackets at the end. | ||
Generally we also follow [good commit message hygene][tpope]. | ||
|
||
|
||
### Releases | ||
|
||
To perform a release: | ||
|
||
1. If you haven't already, install the [`hub`][hub] cli tool. | ||
|
||
2. Run: `(cd app && yarn release)` and follow the instructions. | ||
Here's what a typical release looks like: | ||
|
||
``` | ||
$ yarn release | ||
Cutting release v0.0.11: | ||
✔ git checkout master | ||
✔ git branch release-v0.0.11 && git checkout release-v0.0.11 | ||
✔ yarn run standard-version | ||
✔ git push origin release-v0.0.11 | ||
✔ hub pull-request -p --no-edit | ||
Now ask a peer to review the following pull request, | ||
but don't merge it just yet: | ||
👉 https://github.com/rudolfs/test/pull/17 | ||
To merge the pull request and finalize this release run: | ||
👉 yarn release:finalize v0.0.11 17 | ||
$ yarn release:finalize v0.0.11 17 | ||
Finalizing release v0.0.11: | ||
✔ hub api -XPUT "repos/radicle-dev/radicle-upstream/pulls/17/merge" | ||
✔ git checkout master && git pull | ||
✔ git tag v0.0.11 74369ee3c078bc3688f0b668cc94a36491271d52 | ||
✔ git push --tags | ||
Release v0.0.11 successfully completed! 👏 🎉 🚀 | ||
``` | ||
|
||
3. Once the release PR branch is merged into master a build will be triggered | ||
on Buildkite, this will build the app for both Linux and macOS. When the | ||
build has completed you can download the binaries [here][artifacts]. | ||
|
||
|
||
### CI setup | ||
|
||
CI is configured via: | ||
|
||
``` | ||
radicle-upstream/.buildkite | ||
. | ||
├── Dockerfile | ||
├── pipeline.yaml | ||
└── run.sh | ||
``` | ||
|
||
The build process is run for every commit that is pushed to GitHub. When the | ||
tests pass, the build process spits out and uploads an app binary as build | ||
artifact. When the tests fail, screenshots of the failing tests will be | ||
uploaded instead of the binary. | ||
|
||
|
||
### Buildkite setup | ||
|
||
We use a Docker image that has all of the system dependencies installed to run | ||
tests on Buildkite. Follow these steps if you need to update the dependencies | ||
bundled in the image: | ||
|
||
1. Install [Google Cloud SDK][gc] | ||
|
||
2. Authenticate with Google Cloud: `gcloud auth configure-docker`, pick | ||
`[1] opensourcecoin` when asked for which project to use | ||
|
||
3. Prepare a new docker image with all the necessary dependencies by editing: | ||
`.buildkite/Dockerfile` | ||
|
||
4. Get the current image version from `pipeline.yaml` and build a new Docker | ||
image (remember to bump the version): | ||
``` | ||
cd .buildkite | ||
docker build . -t gcr.io/opensourcecoin/radicle-upstream:0.2.1 | ||
docker push gcr.io/opensourcecoin/radicle-upstream:0.2.1 | ||
``` | ||
|
||
5. Push the new image version to Google Cloud: | ||
`docker push gcr.io/opensourcecoin/radicle-upstream:0.2.1` | ||
|
||
6. Update the image version in `pipeline.yaml`: | ||
``` | ||
DOCKER_IMAGE: 'gcr.io/opensourcecoin/radicle-upstream:0.2.1' | ||
``` | ||
7. Commit changes to `Dockerfile` and `pipeline.yaml` and push to origin, this | ||
should build the new branch with the updated image | ||
|
||
|
||
[tpope]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html | ||
[sv]: https://github.com/conventional-changelog/standard-version | ||
[gc]: https://cloud.google.com/sdk/docs/quickstart-macos | ||
[ccs]: https://www.conventionalcommits.org/en/v1.0.0/ | ||
[artifacts]: https://buildkite.com/monadic/radicle-upstream/builds?branch=master | ||
[hub]: https://github.com/github/hub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
|
||
### [0.0.2](https://github.com/radicle-dev/radicle-upstream/compare/v0.0.1...v0.0.2) (2020-01-23) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.