Skip to content

Commit 43a1bc2

Browse files
committed
Added CI discussion
Signed-off-by: Cristian Le <[email protected]>
1 parent 8c00f47 commit 43a1bc2

File tree

3 files changed

+128
-0
lines changed

3 files changed

+128
-0
lines changed

docs/CI.md

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Continuous Integration (CI) for AsteroidOS
2+
3+
In the various repositories managed by AsteroidOS, we provide a few portable CI configurations that you can use to setup
4+
your own CI server. We offer two CI configurations:
5+
6+
- Monolith (this repository): Contains all CI subprojects
7+
- Individual (project's repository): Links to/Contains the minimum parent CI projects to build the project
8+
9+
AsteroidOS relies on CI to:
10+
11+
- Build and deploy the images for each smartwatch at https://asteroidos.org/install/
12+
- (TBD) Update the apps managed by AsteroidOS and deploy them to AsteroidOS Updater (TBD)
13+
- Manage and provide a public bitbake cache server to speed up the compilation time, both for our developers and anyone
14+
who wishes to contribute
15+
16+
Due to the complex interconnection of the AsteroidOS project, for a bare minimum CI setup, we require that:
17+
18+
| Requirements | TeamCity |
19+
|---------------------------------|:--------:|
20+
| Trigger on third-party commits | V |
21+
| Bootstrap configurations [1] | V |
22+
| Trigger on changes of subfolder | V |
23+
| Trigger on commit message | V |
24+
25+
[1] You can setup/manage your own CI server by simply pointing to your own forks of the project.
26+
27+
| | TeamCity |
28+
|-------------------------|---------------------------------------------------------------------------------------------------|
29+
| Maintainers | [LecrisUT](https://github.com/LecrisUT) |
30+
| Open Source | Closed Source |
31+
| Main Advantage | - Can be setup on local development setup <br/> - Can interconnect with external TeamCity servers |
32+
| Limitations | - 3 Free Build agents <br/> - 100 Build Configurations |
33+
| Docker integration | - Can be run without Docker |
34+
| Integration with Github | - Minimal <br/> - Lacks PullRequest build approval <br/> - Lacks a proper Github app |
35+
| Other noteworthy points | - Integrates with some Cloud agents |
36+
37+
--------------
38+
39+
## Available CI workflows
40+
41+
### Build device
42+
43+
Builds a specific device's image and deploys it to https://asteroidos.org/install/. Triggerred by:
44+
45+
- Changes in files at `meta-smartwatch/meta-$DEVICE` if the commit comment does not start with `[NoBuild]:`
46+
- Commits starting with a comma separated list formatted like `$DEVICE1,$DEVICE2:`, where the relevant device is in the
47+
list
48+
49+
### Rebuild device (from scratch)
50+
51+
Builds a specific device's image without using any `sstate-cache`. Triggerred by:
52+
53+
- Commits starting with `[Rebuild:$DEVICE]:` on either `meta-smarwatch` or `meta-asteroid`
54+
- Trigger by `Rebuild all devices`
55+
56+
### Build package
57+
58+
Builds a specific app's package and deploys it to the package repository connected to AsteroidOS Updated (TBD).
59+
Triggerred by:
60+
61+
- Changes in files at `meta-asteroid-apps/$PACKAGE` if the commit comment does not start with `[NoBuild]:`
62+
- Changes to the repository managing the specific package
63+
64+
### Build all devices
65+
66+
Triggers a `Build device` for all smartwatches. Triggerred by:
67+
68+
- Daily check if any of the `Build package` was triggerred
69+
- Weekly schedule if that week there were no local contributions
70+
71+
### Rebuild all devices
72+
73+
Triggers a `Rebuild device (from scratch)` for all smarwatches. Triggerred by:
74+
75+
- Monthly schedule

docs/CI_TeamCity.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# TeamCity CI setup
2+
3+
This setup was constructed so that it can be easily ported by anyone who want to contribute and develop on their own
4+
forks. Just follow these steps to get your CI server up and running (order of opperations is important):
5+
6+
1. Install a local TeamCity server
7+
2. Create a new project named `Asteroid` pointing to this repository and the specific branch you wish to track and/or
8+
push these settings to
9+
3. Configure the Context Parameters
10+
4. Resolve the red errors related to the missing authenthication by providing a Github access token with at least read
11+
permission to public repositories.
12+
5. (optional) Change the settings repository to point to the project one.
13+
14+
Feel free to change, archive, delete any of the sub-projects to fit your needs and write access.
15+
16+
### Context Parameters
17+
18+
For a full list check `.teamcity/$Project/Settings.kt`.
19+
20+
- `Fork`: [AsteroidOS]<br/>
21+
The fork that should be attached to the current CI project.
22+
- `Devices`: [sturgeon,catfish]<br/>
23+
A comma-separated list of devices you wish to manage.
24+
- `Packages`: [asteroid-launcher]<br/>
25+
A comma-separated list of Asteroid packages you wish to manage.
26+
- (optional) `Upstream`: [AsteroidOS]<br/>
27+
The upstream repository of all the other parent/child projects.
28+
- (optional) `DeploySstate`: [false]<br/>
29+
Enables uploading to the `sstate-cache` server.
30+
- (optional) `PullRequests`: [false]<br/>
31+
Enables tracking pull requests on `fork`.
32+
- (optional) `CommitStatus`: [false]<br/>
33+
Enables pushing commit status to the `fork`.
34+
- (optional) `CommitUser`: [`Fork`]<br/>
35+
The commit user pushing commit status.
36+
*Required if `CommitStatus == true`*.
37+
38+
### Other configurations
39+
40+
- (optional) `$Project/SSH Keys/Sstate Server Key`<br/>
41+
The SSH key used to upload to your own `sstate-cache` server.
42+
*Required if `DeploySstate == true`*.
43+
- (optional) `$Project/Versioned Settings/Tokens/credentialsJSON:0b803d82-f0a8-42ee-b8f9-0fca109a14ab`<br/>
44+
Github OAuth token for `CommitUser` or your account.
45+
*Required if `PullRequests || CommitStatus == true`*.
46+
47+
### Other Notes

docs/Yocto(BitBake).md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Setting up Yocto (Bitbake) development environment
2+
3+
## Sstate-cache server
4+
5+
AsteroidOS provides a public [`sstate-cache` server](https://sstate.asteroid.org) that you can use to speed up your
6+
first time compilation (2 hours -> 10 min).

0 commit comments

Comments
 (0)