Skip to content

Commit 0c17074

Browse files
committed
Use semver DevSH image tags
1 parent 81bfdfc commit 0c17074

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/devsh-foss-image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ jobs:
4444
if [ -n "${requested}" ]; then
4545
image_tag="${requested}"
4646
else
47-
image_tag="devsh-$(date -u +%Y%m%d%H%M%S)-${GITHUB_SHA:0:12}"
47+
base_version=$(python3 -c 'import json; print(json.load(open("package.json"))["version"])')
48+
image_tag="${base_version}-devsh.$(date -u +%Y%m%d%H%M%S).${GITHUB_SHA:0:12}"
4849
fi
4950
echo "image-tag=${image_tag}" >> "${GITHUB_OUTPUT}"
5051
echo "IMAGE_TAG=${image_tag}" >> "${GITHUB_ENV}"
@@ -54,8 +55,7 @@ jobs:
5455
run: |
5556
set -euo pipefail
5657
case "${IMAGE_TAG}" in
57-
devsh-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-*) ;;
58-
8.*-devsh.*) ;;
58+
[0-9]*.[0-9]*.[0-9]*-devsh.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].*) ;;
5959
*) echo "Invalid image tag for DevSH rollout: ${IMAGE_TAG}" >&2; exit 1 ;;
6060
esac
6161

DEVSH.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ The `DevSH FOSS image` workflow builds a fully self-hosted FOSS Rocket.Chat imag
1919
4. Run `yarn fossify`, which removes Enterprise and commercial source directories.
2020
5. Build the Meteor production bundle.
2121
6. Build and verify the Docker image.
22-
7. Publish immutable tags to `ghcr.io/devsh-graphics-programming/rocketchat-foss`.
22+
7. Publish immutable semver-compatible tags to `ghcr.io/devsh-graphics-programming/rocketchat-foss`.
2323

2424
Runtime validation happens after deployment through the TerraInfra Rocket.Chat E2E checks. The image workflow stays focused on producing and publishing the DevSH FOSS container.
2525

2626
## Image Tags
2727

2828
Pushes to `devsh` publish:
2929

30-
- `devsh-YYYYMMDDHHMMSS-<sha>` as the immutable rollout tag.
30+
- `<rocket-version>-devsh.YYYYMMDDHHMMSS.<sha>` as the immutable rollout tag.
3131
- `devsh` as a moving convenience tag.
3232

33-
Terraform/Flux uses only immutable `devsh-YYYYMMDDHHMMSS-<sha>` tags for production rollouts.
33+
Terraform/Flux uses only immutable semver-compatible DevSH tags for production rollouts because the upstream Helm chart runs semver checks against `.Values.image.tag`.
3434

3535
## TerraInfra Integration
3636

3737
TerraInfra watches the GHCR package with Flux image automation:
3838

3939
- `ImageRepository`: `ghcr.io/devsh-graphics-programming/rocketchat-foss`
40-
- `ImagePolicy`: newest immutable `devsh-YYYYMMDDHHMMSS-<sha>` tag
40+
- `ImagePolicy`: newest immutable semver-compatible DevSH tag
4141
- `ImageUpdateAutomation`: commits the selected tag to `env/prod`
4242

4343
After Flux commits the tag update, the Rocket.Chat HelmRelease rolls the deployment on `prod-rocket-01`.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
> [!IMPORTANT]
2-
> This is the DevSH operational fork of Rocket.Chat. The `devsh` branch is used to build a FOSS-only image for the isolated DevSH production workspace. The image workflow runs `yarn fossify`, publishes immutable `devsh-YYYYMMDDHHMMSS-<sha>` tags to `ghcr.io/devsh-graphics-programming/rocketchat-foss`, and TerraInfra/Flux consumes those tags for production rollout on `prod-rocket-01`.
2+
> This is the DevSH operational fork of Rocket.Chat. The `devsh` branch is used to build a FOSS-only image for the isolated DevSH production workspace. The image workflow runs `yarn fossify`, publishes immutable semver-compatible `<rocket-version>-devsh.YYYYMMDDHHMMSS.<sha>` tags to `ghcr.io/devsh-graphics-programming/rocketchat-foss`, and TerraInfra/Flux consumes those tags for production rollout on `prod-rocket-01`.
33
>
44
> Keep runtime infrastructure changes in TerraInfra. Keep this fork close to upstream Rocket.Chat and use `DEVSH.md` for the DevSH branch/build model.
55

0 commit comments

Comments
 (0)