|
1 | 1 | # GitHub Actions
|
2 |
| - |
3 | 2 | This document describes the current CI for the ce-dev project. The CI is written for GitHub Actions, the built in GitHub system for orchestration and automation. We operate three separate GitHub Actions workflows.
|
4 | 3 |
|
5 |
| -## ce-dev-build |
| 4 | +## ce-dev-build-dev |
| 5 | +Builds base and controller images using the contents of the `devel` branch on push. The built images get pushed to Docker Hub and tagged with `devel`. This is very useful for pushing test containers to try out locally. |
| 6 | + |
| 7 | +### Testing project images |
| 8 | +To test a `devel` container on a project, firstly fetch the container image: |
| 9 | + |
| 10 | +``` |
| 11 | +docker pull codeenigma/ce-dev-controller-1.x:devel |
| 12 | +``` |
| 13 | + |
| 14 | +Then edit your project's `ce-dev.compose.yml` file, changing the image for each applicable service to use the `devel` tag instead of the `latest` tag, for example: |
| 15 | + |
| 16 | +```yaml |
| 17 | + image: codeenigma/ce-dev-1.x:devel |
| 18 | +``` |
| 19 | +
|
| 20 | +Finally, destroy and recreate your `docker compose` file and containers: |
| 21 | + |
| 22 | +```bash |
| 23 | +ce-dev destroy |
| 24 | +ce-dev init -t ce-dev.compose.yml |
| 25 | +ce-dev start |
| 26 | +ce-dev provision |
| 27 | +ce-dev deploy |
| 28 | +``` |
| 29 | + |
| 30 | +### Testing an experimental controller |
| 31 | +To test the `devel` version of the `ce-dev-controller` image locally you can do the following: |
| 32 | + |
| 33 | +```bash |
| 34 | +docker pull codeenigma/ce-dev-controller-1.x:devel |
| 35 | +# Replace the 'latest' tag with your 'devel' image |
| 36 | +docker tag codeenigma/ce-dev-controller-1.x:devel codeenigma/ce-dev-controller-1.x:latest |
| 37 | +docker kill ce_dev_controller |
| 38 | +# Then in any ce-dev project |
| 39 | +ce-dev start |
| 40 | +ce-dev provision |
| 41 | +``` |
6 | 42 |
|
7 |
| -This builds the images and binaries, pushes the Docker containers to Docker Hub, pushes the binaries to a GitHub release and builds and commits the ce-dev documentation. It runs when someone accepts a PR for or pushes to the `1.x` branch and has added a valid tag in the format `1.*`. |
| 43 | +If you need to hop branches of `ce-provision` or `ce-deploy` on the controller to try things you can hop on to the container and merge the test branch into `1.x` like so: |
| 44 | + |
| 45 | +```bash |
| 46 | +docker exec -it ce_dev_controller bash |
| 47 | +su ce-dev |
| 48 | +cd ~/ce-provision # or ~/ce-deploy |
| 49 | +git merge origin my_test_branch |
| 50 | +``` |
| 51 | + |
| 52 | +Then use `ce-dev provision` and `ce-dev deploy` in the usual way. |
8 | 53 |
|
9 | 54 | ### Known issues
|
| 55 | +* The golang release needs keeping up to date (there's no 'latest' download we can use) |
| 56 | +* `mkcert` is built from source, initially because of a bad release but now it's like that we might as well keep it that way |
| 57 | + |
| 58 | +## ce-dev-build |
| 59 | +This builds the images and binaries, pushes the Docker containers to Docker Hub, pushes the binaries to a GitHub release and builds and commits the ce-dev documentation. It runs when someone accepts a PR for or pushes to the `1.x` branch and has added a valid tag in the format `1.*`. These images are tagged `latest` in the Docker repository. |
10 | 60 |
|
| 61 | +### Known issues |
11 | 62 | * The golang release needs keeping up to date (there's no 'latest' download we can use)
|
12 |
| -* mkcert is built from source, initially because of a bad release but now it's like that we might as well keep it that way |
| 63 | +* `mkcert` is built from source, initially because of a bad release but now it's like that we might as well keep it that way |
13 | 64 | * If we start developing in a new version branch we will need to update the `on: push:` YAML in this workflow to allow the new tags or it won't execute
|
14 | 65 |
|
15 | 66 | ## ce-dev-lint
|
16 |
| - |
17 | 67 | This runs ESLint over the JavaScript code in the `src` directory. It runs on every pull request. It uses the ESLint config defined in `./.eslintrc` so if you need to change its behaviour, edit that file.
|
18 | 68 |
|
19 | 69 | ## ce-dev-test
|
20 |
| - |
21 | 70 | This builds the images and tests the ce-dev stack. It runs on every pull request and daily at 6:30.
|
22 | 71 |
|
23 | 72 | ### Known issues
|
24 |
| - |
25 | 73 | * The golang release needs keeping up to date (there's no 'latest' download we can use)
|
26 |
| -* mkcert is built from source, initially because of a bad release but now it's like that we might as well keep it that way |
| 74 | +* `mkcert` is built from source, initially because of a bad release but now it's like that we might as well keep it that way |
0 commit comments