Skip to content

Commit 9201647

Browse files
committed
docs: add versioning strategy to readme
1 parent b5b36b6 commit 9201647

File tree

1 file changed

+53
-2
lines changed

1 file changed

+53
-2
lines changed

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@
44
[![Linting & Formatting](https://github.com/philips-software/amp-devcontainer/actions/workflows/linting-formatting.yml/badge.svg)](https://github.com/philips-software/amp-devcontainer/actions/workflows/linting-formatting.yml) [![Continuous Integration](https://github.com/philips-software/amp-devcontainer/actions/workflows/continuous-integration.yml/badge.svg?branch=main)](https://github.com/philips-software/amp-devcontainer/actions/workflows/continuous-integration.yml) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9267/badge)](https://www.bestpractices.dev/projects/9267) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/philips-software/amp-devcontainer/badge)](https://securityscorecards.dev/viewer/?uri=github.com/philips-software/amp-devcontainer)
55
<!-- markdownlint enable -->
66

7+
## Table of Contents
8+
9+
- [Overview](#overview)
10+
- [State](#state)
11+
- [Description](#description)
12+
- [Image flavors](#image-flavors)
13+
- [Versioning](#versioning)
14+
- [Visual Studio Code](#visual-studio-code)
15+
- [Usage](#usage)
16+
- [Verify image signature](#verify-image-signature)
17+
- [Local development](#local-development)
18+
- [Continuous Integration](#continuous-integration)
19+
- [Community](#community)
20+
- [Changelog](#changelog)
21+
- [Contributing](#contributing)
22+
- [Reporting vulnerabilities](#reporting-vulnerabilities)
23+
- [Licenses](#licenses)
24+
725
## Overview
826

927
This repository contains [devcontainers](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers) tailored towards modern, embedded, software development.
@@ -18,7 +36,7 @@ This repository is under active development; see [pulse](https://github.com/phil
1836

1937
## Description
2038

21-
### Image variants
39+
### Image flavors
2240

2341
The following devcontainers are published towards the [GitHub Container Registry](https://ghcr.io/):
2442

@@ -45,6 +63,27 @@ Next to the Rust ecosystem there is support for code-coverage measurement, mutat
4563

4664
For embedded development and flashing and debugging [probe-rs](https://probe.rs/) and [flip-link](https://github.com/knurling-rs/flip-link) are included.
4765

66+
### Versioning
67+
68+
The amp-devcontainer repository follows a [semantic versioning](https://semver.org/spec/v2.0.0.html) strategy for its container images. This ensures clear communication of updates and compatibility. The versioning format used is `<major>.<minor>.<patch>`. Released containers are tagged with `<major>`, `<major>.<minor>`, `<major>.<minor>.<patch>` and `v<major>.<minor>.<patch>`. The latest build on the default branch is tagged with `edge` and pull request builds are tagged with `pr-<number>`.
69+
70+
| Branch | Tag |
71+
|-------------------|----------------------------|
72+
| Default | `edge` |
73+
| Pull Request | `pr-<number>` |
74+
| Release | `v<major>.<minor>.<patch>` |
75+
| | `<major>.<minor>.<patch>` |
76+
| | `<major>.<minor>` |
77+
| | `<major>` |
78+
79+
Released containers will never be cleaned-up, pull request builds are cleaned up when the pull request is merged, and edge builds may be cleaned up after being stale for a while.
80+
81+
The release notes always contain an overview of the corresponding image versions that included the full SHA next to the version number. This makes it possible for humans to easily see what version is used while still pinning to an exact version. This is the recommended way to refer to an image.
82+
83+
All container images are included in a release. This might change in the future when the need arises to have separate releases per container.
84+
85+
This versioning strategy is implemented as GitHub Actions workflows, ensuring consistency and security across releases. Only the GitHub Action workflow is allowed to create a release, and the resulting images are [signed](#verify-image-signature).
86+
4887
### Visual Studio Code
4988

5089
Both containers can be used in Visual Studio Code or GitHub Codespaces without any additional configuration. All included tools are set-up and necessary plug-ins will be installed at container start. This behavior is implemented by appending devcontainer metadata to an image label according to these [specifications](https://containers.dev/implementors/reference/#labels). It is possible to override, amend or change the options following this [merge logic](https://containers.dev/implementors/spec/#merge-logic).
@@ -117,6 +156,17 @@ The resulting containers can be used in a `.devcontainer.json` file or in a `.de
117156
}
118157
```
119158

159+
### Continuous integration
160+
161+
The resulting containers can be used in a GitHub workflow by using the [`container`](https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/running-jobs-in-a-container) property on a job.
162+
163+
```yaml
164+
jobs:
165+
container-job:
166+
runs-on: ubuntu-latest
167+
container: ghcr.io/philips-software/amp-devcontainer-cpp:latest
168+
```
169+
120170
## Community
121171
122172
This project uses a [code of conduct](.github/CODE_OF_CONDUCT.md) to define expected conduct in our community. Instances of
@@ -157,4 +207,5 @@ See [security](.github/SECURITY.md) for more information.
157207

158208
## Licenses
159209

160-
See [license](./LICENSE).
210+
amp-devcontainer is licensed under the MIT license
211+
See [license](./LICENSE) for more information.

0 commit comments

Comments
 (0)