-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Cristian Le <[email protected]>
- Loading branch information
Showing
3 changed files
with
128 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Continuous Integration (CI) for AsteroidOS | ||
|
||
In the various repositories managed by AsteroidOS, we provide a few portable CI configurations that you can use to setup | ||
your own CI server. We offer two CI configurations: | ||
|
||
- Monolith (this repository): Contains all CI subprojects | ||
- Individual (project's repository): Links to/Contains the minimum parent CI projects to build the project | ||
|
||
AsteroidOS relies on CI to: | ||
|
||
- Build and deploy the images for each smartwatch at https://asteroidos.org/install/ | ||
- (TBD) Update the apps managed by AsteroidOS and deploy them to AsteroidOS Updater (TBD) | ||
- Manage and provide a public bitbake cache server to speed up the compilation time, both for our developers and anyone | ||
who wishes to contribute | ||
|
||
Due to the complex interconnection of the AsteroidOS project, for a bare minimum CI setup, we require that: | ||
|
||
| Requirements | TeamCity | | ||
|---------------------------------|:--------:| | ||
| Trigger on third-party commits | V | | ||
| Bootstrap configurations [1] | V | | ||
| Trigger on changes of subfolder | V | | ||
| Trigger on commit message | V | | ||
|
||
[1] You can setup/manage your own CI server by simply pointing to your own forks of the project. | ||
|
||
| | TeamCity | | ||
|-------------------------|---------------------------------------------------------------------------------------------------| | ||
| Maintainers | [LecrisUT](https://github.com/LecrisUT) | | ||
| Open Source | Closed Source | | ||
| Main Advantage | - Can be setup on local development setup <br/> - Can interconnect with external TeamCity servers | | ||
| Limitations | - 3 Free Build agents <br/> - 100 Build Configurations | | ||
| Docker integration | - Can be run without Docker | | ||
| Integration with Github | - Minimal <br/> - Lacks PullRequest build approval <br/> - Lacks a proper Github app | | ||
| Other noteworthy points | - Integrates with some Cloud agents | | ||
|
||
-------------- | ||
|
||
## Available CI workflows | ||
|
||
### Build device | ||
|
||
Builds a specific device's image and deploys it to https://asteroidos.org/install/. Triggerred by: | ||
|
||
- Changes in files at `meta-smartwatch/meta-$DEVICE` if the commit comment does not start with `[NoBuild]:` | ||
- Commits starting with a comma separated list formatted like `$DEVICE1,$DEVICE2:`, where the relevant device is in the | ||
list | ||
|
||
### Rebuild device (from scratch) | ||
|
||
Builds a specific device's image without using any `sstate-cache`. Triggerred by: | ||
|
||
- Commits starting with `[Rebuild:$DEVICE]:` on either `meta-smarwatch` or `meta-asteroid` | ||
- Trigger by `Rebuild all devices` | ||
|
||
### Build package | ||
|
||
Builds a specific app's package and deploys it to the package repository connected to AsteroidOS Updated (TBD). | ||
Triggerred by: | ||
|
||
- Changes in files at `meta-asteroid-apps/$PACKAGE` if the commit comment does not start with `[NoBuild]:` | ||
- Changes to the repository managing the specific package | ||
|
||
### Build all devices | ||
|
||
Triggers a `Build device` for all smartwatches. Triggerred by: | ||
|
||
- Daily check if any of the `Build package` was triggerred | ||
- Weekly schedule if that week there were no local contributions | ||
|
||
### Rebuild all devices | ||
|
||
Triggers a `Rebuild device (from scratch)` for all smarwatches. Triggerred by: | ||
|
||
- Monthly schedule |
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,47 @@ | ||
# TeamCity CI setup | ||
|
||
This setup was constructed so that it can be easily ported by anyone who want to contribute and develop on their own | ||
forks. Just follow these steps to get your CI server up and running (order of opperations is important): | ||
|
||
1. Install a local TeamCity server | ||
2. Create a new project named `Asteroid` pointing to this repository and the specific branch you wish to track and/or | ||
push these settings to | ||
3. Configure the Context Parameters | ||
4. Resolve the red errors related to the missing authenthication by providing a Github access token with at least read | ||
permission to public repositories. | ||
5. (optional) Change the settings repository to point to the project one. | ||
|
||
Feel free to change, archive, delete any of the sub-projects to fit your needs and write access. | ||
|
||
### Context Parameters | ||
|
||
For a full list check `.teamcity/$Project/Settings.kt`. | ||
|
||
- `Fork`: [AsteroidOS]<br/> | ||
The fork that should be attached to the current CI project. | ||
- `Devices`: [sturgeon,catfish]<br/> | ||
A comma-separated list of devices you wish to manage. | ||
- `Packages`: [asteroid-launcher]<br/> | ||
A comma-separated list of Asteroid packages you wish to manage. | ||
- (optional) `Upstream`: [AsteroidOS]<br/> | ||
The upstream repository of all the other parent/child projects. | ||
- (optional) `DeploySstate`: [false]<br/> | ||
Enables uploading to the `sstate-cache` server. | ||
- (optional) `PullRequests`: [false]<br/> | ||
Enables tracking pull requests on `fork`. | ||
- (optional) `CommitStatus`: [false]<br/> | ||
Enables pushing commit status to the `fork`. | ||
- (optional) `CommitUser`: [`Fork`]<br/> | ||
The commit user pushing commit status. | ||
*Required if `CommitStatus == true`*. | ||
|
||
### Other configurations | ||
|
||
- (optional) `$Project/SSH Keys/Sstate Server Key`<br/> | ||
The SSH key used to upload to your own `sstate-cache` server. | ||
*Required if `DeploySstate == true`*. | ||
- (optional) `$Project/Versioned Settings/Tokens/credentialsJSON:0b803d82-f0a8-42ee-b8f9-0fca109a14ab`<br/> | ||
Github OAuth token for `CommitUser` or your account. | ||
*Required if `PullRequests || CommitStatus == true`*. | ||
|
||
### Other Notes |
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,6 @@ | ||
# Setting up Yocto (Bitbake) development environment | ||
|
||
## Sstate-cache server | ||
|
||
AsteroidOS provides a public [`sstate-cache` server](https://sstate.asteroid.org) that you can use to speed up your | ||
first time compilation (2 hours -> 10 min). |