Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make debian version configureable #146

Open
wants to merge 1 commit into
base: 6.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/image-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
plone-version:
required: true
type: string
debian-version:
required: true
type: string
image-name:
required: true
type: string
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ jobs:
echo "PLATFORMS=$PLATFORMS" >> $GITHUB_OUTPUT
echo "IS_LATEST=$IS_LATEST" >> $GITHUB_OUTPUT
echo "PLONE_VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT
echo "DEBIAN_VERSION=$(cat version-debian.txt)" >> $GITHUB_OUTPUT

builder-image:
needs:
- meta
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }}
image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-builder
dockerfile: Dockerfile.builder
platforms: ${{ needs.meta.outputs.PLATFORMS }}
Expand All @@ -54,6 +56,7 @@ jobs:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }}
image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-prod-config
dockerfile: Dockerfile.prod
platforms: ${{ needs.meta.outputs.PLATFORMS }}
Expand All @@ -72,6 +75,7 @@ jobs:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }}
image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-dev
dockerfile: Dockerfile.dev
platforms: ${{ needs.meta.outputs.PLATFORMS }}
Expand All @@ -91,6 +95,7 @@ jobs:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }}
image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-acceptance
dockerfile: Dockerfile.acceptance
platforms: ${{ needs.meta.outputs.PLATFORMS }}
Expand All @@ -111,6 +116,7 @@ jobs:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }}
image-name: |
ghcr.io/plone/server
ghcr.io/plone/plone-backend
Expand All @@ -134,6 +140,7 @@ jobs:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
debian-version: ${{ needs.meta.outputs.DEBIAN_VERSION }}
image-name: |
ghcr.io/plone/plone-classicui
plone/plone-classicui
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
outputs:
SHA: ${{ steps.vars.outputs.SHA }}
PLONE_VERSION: ${{ steps.vars.outputs.PLONE_VERSION }}
DEBIAN_VERSION: ${{ steps.vars.outputs.DEBIAN_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -24,6 +25,7 @@ jobs:
run: |
echo "SHA=sha-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "PLONE_VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT
echo "DEBIAN_VERSION=$(cat version-debian.txt)" >> $GITHUB_OUTPUT

test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -80,6 +82,7 @@ jobs:
push: true
build-args: |
PLONE_VERSION=${{ needs.meta.outputs.PLONE_VERSION }}
DEBIAN_VERSION=${{ needs.meta.outputs.DEBIAN_VERSION }}

- name: Build prod-config image for testing
uses: docker/build-push-action@v4
Expand All @@ -98,6 +101,7 @@ jobs:
push: true
build-args: |
PLONE_VERSION=${{ needs.meta.outputs.SHA }}
DEBIAN_VERSION=${{ needs.meta.outputs.DEBIAN_VERSION }}

- name: Test
run: |
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim-bullseye
ARG DEBIAN_VERSION=bullseye
FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION}

ARG PLONE_VERSION

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.nightly
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim-bullseye as base
ARG DEBIAN_VERSION=bullseye
FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} as base
FROM base as builder

ENV PIP_PARAMS=""
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim-bullseye
ARG DEBIAN_VERSION=bullseye
FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION}

LABEL maintainer="Plone Community <[email protected]>" \
org.label-schema.name="server-prod-conf" \
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ MAIN_IMAGE_NAME=plone/plone-backend
CLASSICUI_IMAGE_NAME=plone/plone-classicui
BASE_IMAGE_NAME=plone/server
PLONE_VERSION=$$(cat version.txt)
DEBIAN_VERSION=$$(cat version-debian.txt)
IMAGE_TAG=${PLONE_VERSION}
NIGHTLY_IMAGE_TAG=nightly

Expand Down Expand Up @@ -68,7 +69,7 @@ show-image: ## Print Version
.PHONY: image-builder
image-builder: ## Build Base Image
@echo "Building $(BASE_IMAGE_NAME)-builder:$(IMAGE_TAG)"
@docker buildx build . --build-arg PLONE_VERSION=${PLONE_VERSION} -t $(BASE_IMAGE_NAME)-builder:$(IMAGE_TAG) -f Dockerfile.builder --load
@docker buildx build . --build-arg PLONE_VERSION=${PLONE_VERSION} --build-arg DEBIAN_VERSION=${DEBIAN_VERSION} -t $(BASE_IMAGE_NAME)-builder:$(IMAGE_TAG) -f Dockerfile.builder --load

.PHONY: image-dev
image-dev: ## Build Dev Image
Expand All @@ -78,7 +79,7 @@ image-dev: ## Build Dev Image
.PHONY: image-prod-config
image-prod-config: ## Build Prod Image
@echo "Building $(BASE_IMAGE_NAME)-prod-config:$(IMAGE_TAG)"
@docker buildx build . --build-arg PLONE_VERSION=${PLONE_VERSION} -t $(BASE_IMAGE_NAME)-prod-config:$(IMAGE_TAG) -f Dockerfile.prod --load
@docker buildx build . --build-arg PLONE_VERSION=${PLONE_VERSION} --build-arg DEBIAN_VERSION=${DEBIAN_VERSION} -t $(BASE_IMAGE_NAME)-prod-config:$(IMAGE_TAG) -f Dockerfile.prod --load

.PHONY: image-classicui
image-classicui: ## Build Classic UI
Expand All @@ -98,7 +99,7 @@ image-main: ## Build main image
.PHONY: image-nightly
image-nightly: ## Build Docker Image Nightly
@echo "Building $(MAIN_IMAGE_NAME):$(NIGHTLY_IMAGE_TAG)"
@docker build . -t $(MAIN_IMAGE_NAME):$(NIGHTLY_IMAGE_TAG) -f Dockerfile.nightly
@docker build . --build-arg DEBIAN_VERSION=${DEBIAN_VERSION} -t $(MAIN_IMAGE_NAME):$(NIGHTLY_IMAGE_TAG) -f Dockerfile.nightly

.PHONY: build-images
build-images: ## Build Images
Expand Down
1 change: 1 addition & 0 deletions version-debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bullseye
Loading