Skip to content

Commit 52af5f0

Browse files
committed
Update buildpack documentation
1 parent 9459bb1 commit 52af5f0

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed
64.4 KB
Loading

docs/upd-build-env.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,43 @@ There are four main repositories involved in generating the environment.
1111
- [`buildpack-hal`](https://github.com/particle-iot/buildpack-hal/): Contains the `Dockerfile` that specifies the contents of the environment, which is consumed by CI, CD, WebIDE and the Workbench.
1212
- [`device-os`](https://github.com/particle-iot/device-os/): Contains the `.workbench/manifest.json` file, which specifies the necessary components.
1313
- [`firmware-buildpack-builder`](https://github.com/particle-iot/firmware-buildpack-builder/): Contains the Dockerfile fragments, which are used during CI to validate builds and create the images consumed by the WebIDE compiler.
14-
- [`workbench`](https://github.com/particle-iot/workbench/): Contains the dependency installer script that consumes the manifest file from the `device-os` repository.
14+
- [`workbench`](https://github.com/particle-iot/workbench/)*: Contains the dependency installer script that consumes the manifest file from the `device-os` repository.
1515

1616
Relationship Mapping
1717
--------------------
1818

19+
!["Buildpack Dependency Chart"](./img/buildpack-dependency-chart.png "Circular Dependency")
20+
1921
Examples
2022
--------
2123

2224
### Upgrading the `gcc-arm` compiler
2325

24-
#### Create the dependency bundle
26+
1. Create the dependency bundle
27+
28+
1. Download the dependency for your platform
29+
1. [Create a bundle](https://github.com/particle-iot/workbench#development)
30+
1. Generate a SHA-256 hash for the bundle
31+
1. Upload the bundle to Amazon S3
32+
33+
1. Update `device-os`
2534

26-
1. Download the dependency for your platform
27-
1. [Create a bundle](https://github.com/particle-iot/workbench#development)
28-
1. Generate a SHA-256 hash for the bundle
29-
1. Upload the bundle to Amazon S3
35+
1. Update `<particle-iot/device-os>/.workbench/manifest.json` to reflect the new dependency
36+
1. Update the `BUILDPACK_BUILDER_VERSION_TAG` variable to tell Travis CI to use the new `branch` or `tag` from `<particle-iot/device-os>/scripts/fetch-buildpack`
37+
1. Push a new branch to the `particle-iot/device-os` repository
3038

31-
#### Update `device-os`
39+
> _**NOTE:** Travis CI will fail, because the new `branch` or `tag` in `firmware_buildpack_builder` can't exist due to the circular dependency (depicted above)._
3240
33-
1. Update `<particle-iot/device-os>/.workbench/manifest.json` to reflect the new dependency
34-
1. Update the `BUILDPACK_FILES` variable to target new `branch` or `tag` in `<particle-iot/device-os>/scripts/fetch-buildpack`
35-
1. Create a PR against `particle-iot/device-os`
41+
1. Update `buildpack-hal`
3642

37-
#### Update `buildpack-hal`
43+
1. Update the `GITHUB_BRANCH` variable in the `build-and-push` script, to identify which `device-os` branch will provide the updated version of the manifest file
44+
1. Update the `COPY` command in the `Dockerfile` to copy the new dependency from the `worker` stage to the `buildpack-hal` stage
45+
1. Tag the commit with a version to be used. (i.e. `0.1.0`)
46+
1. Push a new branch to the `particle-iot/buildpack-hal` repository
3847

39-
1. Update the `GITHUB_BRANCH` in the `build-and-push` script, to identify which `device-os` branch will provide the updated version of the manifest file
40-
1. Update the `COPY` command in the `Dockerfile` to copy the new dependency from the `worker` stage to the `buildpack-hal` stage
41-
1. Tag the commit with a version to be used. (i.e. `0.1.0`)
42-
1. Create a PR against `particle-iot/buildpack-hal`
48+
1. Update `firmware-buildpack-builder`
4349

44-
#### Update `firmware-buildpack-builder`
50+
1. Update `BUILDPACK_VERSION` in `<particle-iot/device-os>/scripts/constants` to reflect the name of the tag provided to `buildpack-hal`, which was used to tag the resulting Docker image
51+
1. Push a new branch to the `firmware-buildpack-builder` repository
4552

46-
1. Update `BUILDPACK_VERSION` in `<particle-iot/device-os>/scripts/constants` to reflect the name of the tag provided to `buildpack-hal`
47-
1. Create a PR against `firmware-buildpack-builder`
53+
1. Restart the original `device-os` Travis CI job _(above)_

0 commit comments

Comments
 (0)