Skip to content

Commit

Permalink
Merge pull request #1444 from cybozu/revise-maintenance-procedures
Browse files Browse the repository at this point in the history
Revise maintenance procedures
  • Loading branch information
takahiro-yamada authored Oct 21, 2024
2 parents 604d668 + 4d2d4d0 commit 3390660
Show file tree
Hide file tree
Showing 2 changed files with 310 additions and 165 deletions.
35 changes: 16 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
[![CircleCI](https://circleci.com/gh/cybozu/neco-containers.svg?style=svg)](https://circleci.com/gh/cybozu/neco-containers)
[![main](https://github.com/cybozu/neco-containers/actions/workflows/main.yaml/badge.svg)](https://github.com/cybozu/neco-containers/actions/workflows/main.yaml)

Neco Containers
===============
# Neco Containers

This repository contains Dockerfiles to build OSS products
used in our project, Neco. They are built from the official
sources, and based on our Ubuntu base image.

See also: [github.com/cybozu/ubuntu-base](https://github.com/cybozu/ubuntu-base).

Built images can be pulled from [quay.io/cybozu][quay].
Built images can be pulled from [ghcr.io/cybozu][ghcr].

How it works
------------
## How it works

Subdirectories in this repository have `TAG` and `BRANCH` files
in addition to files to build Docker images.
Expand All @@ -21,20 +20,19 @@ These will be used by CircleCI to tag the built images.
CircleCI does the following each time commits are pushed to a branch.

1. For each directory containing `TAG` file:
1. Read `TAG` file and check if the repository at [quay.io/cybozu][quay] with the same name of the directory.
1. If the repository contains the same tag in `TAG`, continue to the next directory.
1. Otherwise, build a Docker image using `Dockerfile` under the directory.
1. If the branch is not `main`, CircleCI stops here without pushing.
1. If the branch is `main`, for each directory with a built image:
1. Read `TAG` file and check if the repository at [ghcr.io/cybozu][ghcr] with the same name of the directory.
2. If the repository contains the same tag in `TAG`, continue to the next directory.
3. Otherwise, build a Docker image using `Dockerfile` under the directory.
2. If the branch is not `main`, CircleCI stops here without pushing.
3. If the branch is `main`, for each directory with a built image:
1. Tag the built image with tag in `TAG` file.
1. Push the tagged image to quay.io.
1. If `TAG` represents a pre-release such as `1.2-rc.1`, continue to the next directory.
1. If the directory contains `BRANCH` file:
2. Push the tagged image to ghcr.io.
3. If `TAG` represents a pre-release such as `1.2-rc.1`, continue to the next directory.
4. If the directory contains `BRANCH` file:
1. Tag the built image with tag in `BRANCH` file.
1. Push the tagged image to quay.io.
2. Push the tagged image to ghcr.io.

Tag naming
----------
## Tag naming

Images whose upstream version conform to [Semantic Versioning 2.0.0][semver] should be
tagged like this:
Expand All @@ -59,11 +57,10 @@ The container image version _must_ be reset to 1 when the upstream version is ch

If the upstream version is "1.2.0-beta.3", the image tag must begin with "1.2.0-beta.3.1".

Branch naming
-------------
## Branch naming

If the image is built for an upstream version X.Y.Z, the branch name _should_ be X.Y
for X > 0, or "0" for X == 0.

[quay]: https://quay.io/organization/cybozu
[ghcr]: https://github.com/orgs/cybozu/packages
[semver]: https://semver.org/
Loading

0 comments on commit 3390660

Please sign in to comment.