Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .github/scripts/00-localsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 00-localsetup.sh — Local orchestrator for the Pimcore API test environment
#
# Usage:
# ./.github/scripts/00-localsetup.sh --token=<ENTERPRISE_REPO_TOKEN> [--platform-version=2026.3]
# ./.github/scripts/00-localsetup.sh --token=<ENTERPRISE_REPO_TOKEN> [--platform-version=2026.3.x]
#
# First-time flow (no credentials yet):
# 1. Run: ./.github/scripts/00-localsetup.sh --token=<TOKEN>
Expand All @@ -24,7 +24,7 @@ source "${FILES_DIR}/.env"
[[ -f "$ENV_LOCAL" ]] && source "$ENV_LOCAL"

TOKEN="${COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN:-}"
PLATFORM_VERSION="${PLATFORM_VERSION:-2026.3}"
PLATFORM_VERSION="${PLATFORM_VERSION:-2026.3.x}"

# ─── Parse arguments ─────────────────────────────────────────────────────────
for arg in "$@"; do
Expand All @@ -36,8 +36,8 @@ for arg in "$@"; do
echo ""
echo "Options:"
echo " --token=TOKEN Enterprise packagist token (required)"
echo " --platform-version=VER Platform/skeleton version to install (default: 2026.3)"
echo " Examples: 2026.3 (stable), 2026.x (dev branch)"
echo " --platform-version=VER Platform/skeleton version to install (default: 2026.3.x)"
echo " Examples: 2026.3.x (release branch), 2026.x (dev branch)"
echo ""
echo "Other scripts:"
echo " 05-reset.sh Fast DB reset — re-runs installer without composer steps"
Expand Down
15 changes: 12 additions & 3 deletions .github/scripts/01-setup-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# ./01-setup-environment.sh <TOKEN> <PLATFORM_VERSION> [--ci]
#
# TOKEN Enterprise packagist token
# PLATFORM_VERSION e.g. 2026.3 (stable) or 2026.x (dev branch)
# PLATFORM_VERSION e.g. 2026.3.x (release branch) or 2026.x (dev branch)
# --ci CI mode: use github-actions repo URL
#
set -euo pipefail

TOKEN="${1:-}"
PLATFORM_VERSION="${2:-2026.3}"
PLATFORM_VERSION="${2:-2026.3.x}"
CI_MODE=false
for arg in "$@"; do [[ "$arg" == "--ci" ]] && CI_MODE=true; done

Expand Down Expand Up @@ -70,13 +70,22 @@ fi
PROJECT_PARENT="$(dirname "$PROJECT_PATH")"
PROJECT_NAME="$(basename "$PROJECT_PATH")"

docker run \
if ! docker run \
-u "$(id -u):$(id -g)" --rm \
-v "${PROJECT_PARENT}:/var/www/html" \
-e COMPOSER_HOME=/tmp/composer \
"${PHP_IMAGE}" \
composer create-project "pimcore/skeleton:${SKELETON_CONSTRAINT}" "$PROJECT_NAME" \
--no-scripts --no-interaction
then
if [[ "$SKELETON_CONSTRAINT" == ^* ]]; then
echo ""
echo "HINT: '${PLATFORM_VERSION}' became the stable constraint '${SKELETON_CONSTRAINT}',"
echo " which only resolves once the line is tagged. Pass '${PLATFORM_VERSION}.x'"
echo " to install the release branch (${PLATFORM_VERSION}.x-dev) instead."
fi
exit 1
fi

# ─── Copy config files ────────────────────────────────────────────────────────
echo ">>> Copying configuration files..."
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/02-install-pimcore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# ./02-install-pimcore.sh <TOKEN> <PLATFORM_VERSION> [--ci]
#
# TOKEN Enterprise packagist token
# PLATFORM_VERSION e.g. 2026.3 (stable) or 2026.x (dev branch)
# PLATFORM_VERSION e.g. 2026.3.x (release branch) or 2026.x (dev branch)
# --ci CI mode: use github-actions repo URL
#
set -euo pipefail

TOKEN="${1:-}"
PLATFORM_VERSION="${2:-2026.3}"
PLATFORM_VERSION="${2:-2026.3.x}"
CI_MODE=false
for arg in "$@"; do [[ "$arg" == "--ci" ]] && CI_MODE=true; done

Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to test'
description: 'Branch to check out (test code)'
default: '2026.x'
type: choice
options:
- '2026.3'
- '2026.x'
platform_version:
description: 'Platform version (e.g. 2026.3, 2026.3.x or 2026.x)'
description: 'Platform version to install'
default: '2026.x'
type: string
type: choice
# '2026.3' is added here once v2026.3.0 is tagged; `^2026.3` cannot
# resolve before that, so it must not be selectable.
options:
- '2026.3.x'
- '2026.x'

env:
PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }}
Expand All @@ -35,8 +40,11 @@ jobs:
fail-fast: false
matrix:
# ref = git branch checked out (test code); platform = version installed
# schedule legs: 2026.3 release (^2026.3), 2026.3 dev branch (2026.3.x-dev), 2026.x dev branch (2026.x-dev)
include: ${{ github.event_name == 'schedule' && fromJSON('[{"ref":"2026.3","platform":"2026.3"},{"ref":"2026.3","platform":"2026.3.x"},{"ref":"2026.x","platform":"2026.x"}]') || fromJSON(format('[{{"ref":"{0}","platform":"{1}"}}]', inputs.branch, inputs.platform_version || inputs.branch)) }}
# schedule legs: 2026.3 dev branch (2026.3.x-dev), 2026.x dev branch (2026.x-dev)
# The 2026.3 release leg ({"ref":"2026.3","platform":"2026.3"}) is added once
# v2026.3.0 is tagged — `^2026.3` cannot resolve before that, see
# "Testing a Platform Version Before Its Release" in doc/04_API_Testing/01_API_TESTS.md.
include: ${{ github.event_name == 'schedule' && fromJSON('[{"ref":"2026.3","platform":"2026.3.x"},{"ref":"2026.x","platform":"2026.x"}]') || fromJSON(format('[{{"ref":"{0}","platform":"{1}"}}]', inputs.branch, inputs.platform_version || inputs.branch)) }}

steps:
- name: Checkout
Expand Down
31 changes: 29 additions & 2 deletions doc/04_API_Testing/01_API_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ npm install
### 2. Full setup + tests

```bash
.github/scripts/00-localsetup.sh --token=<enterprisetoken> --platform-version=2026.3
.github/scripts/00-localsetup.sh --token=<enterprisetoken> --platform-version=2026.3.x
```

On the first run the script pauses and prints a registration URL. Register the
Expand Down Expand Up @@ -72,6 +72,31 @@ Admin credentials: `admin` / `admin`
.github/scripts/06-teardown.sh # full shutdown
```

## Testing a Platform Version Before Its Release

A platform version that is branched but not yet tagged is tested through its
**release branch**, i.e. `2026.3.x` → `2026.3.x-dev`:

```bash
gh workflow run api-tests.yml --repo pimcore/platform-version \
--ref 2026.3 -f branch=2026.3 -f platform_version=2026.3.x
```

A bare `2026.3` does not work before `v2026.3.0` exists, and fails differently in
each script:

- `01-setup-environment.sh` builds `pimcore/skeleton:^2026.3`, and
`composer create-project` runs at stability `stable` — it aborts with
*Could not find package pimcore/skeleton with version ^2026.3*.
- `02-install-pimcore.sh` runs under `minimum-stability: dev`, where `^2026.3`
*does* resolve — to `2026.x-dev`, which normalizes to `2026.9999999.9999999`
and outranks `2026.3.x-dev`. That is a green run against the wrong line.

So `2026.3` is neither a schedule leg nor a selectable `platform_version` until the
tag exists; until then the release branch is covered by the `2026.3.x` leg. Unlike
`2026.x`, that leg does exercise the release branch's pinned `conflict` bounds
(`<2026.3 || >=2026.4`), which is what will actually ship.

## New Platform Version Release

When releasing a new platform version (e.g. `2026.3`), update the following:
Expand All @@ -81,8 +106,10 @@ When releasing a new platform version (e.g. `2026.3`), update the following:
appended:
- `inputs.branch.options` — replace the previous stable entry (e.g. `'2026.2'`)
with the new one (`'2026.3'`); `'2026.x'` stays
- `inputs.platform_version.options` — add the now-tagged `'2026.3'`
- `inputs.platform_version.description` — update the examples
- `strategy.matrix.include` — the three scheduled legs are
- `strategy.matrix.include` — do this step **at tagging time, not before**
(see the section above). The three scheduled legs are
`{ref: <new>, platform: <new>}` (installs `^2026.3`),
`{ref: <new>, platform: <new>.x}` (installs `2026.3.x-dev` from the release
branch) and `{ref: 2026.x, platform: 2026.x}` (installs `2026.x-dev`).
Expand Down
Loading