Skip to content

Commit 79b29b7

Browse files
committed
Update recipe and GHA to work with shop 8.0.x
1 parent 6c44dbb commit 79b29b7

9 files changed

Lines changed: 108 additions & 19 deletions

File tree

.github/oxid-esales/graphql-base.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
install:
77
cache:
88
prepared_shop: false
9+
method: 'script'
10+
script: 'source/.github/oxid-esales/install.sh'
911
git:
1012
repository: '{{ $repo }}'
1113
ref: &ref '{{ .Github.RefName }}'
@@ -25,7 +27,7 @@ install:
2527
custom_script_container: |
2628
perl -pi -e 'print "SetEnvIf Authorization \"(.*)\" HTTP_AUTHORIZATION=\$1\n\n" if $. == 1' source/.htaccess
2729
28-
vendor/bin/oe-console oe:database:reset --db-host=mysql --db-port=3306 --db-name=example --db-user=root --db-password=root --force
30+
vendor/bin/oe-console oe:database:reset --force
2931
vendor/bin/oe-console oe:module:install ./
3032
3133
vendor/bin/oe-eshop-doctrine_migration migrations:migrate

.github/oxid-esales/install.sh

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/bin/bash
2+
# shellcheck disable=SC2154
3+
# Lower case environment variables are passed from the workflow and used here
4+
# We use a validation loop in init to ensure, they're set
5+
# shellcheck disable=SC2086
6+
# We want install_container_options to count as multiple arguments
7+
set -e
8+
9+
function error() {
10+
echo -e "\033[0;31m${1}\033[0m"
11+
exit 1
12+
}
13+
14+
function init() {
15+
for VAR in install_container_method install_container_options install_container_name \
16+
install_config_idebug install_is_enterprise; do
17+
echo -n "Checking, if $VAR is set ..."
18+
if [ -z ${VAR+x} ]; then
19+
error "Variable '${VAR}' not set"
20+
fi
21+
echo "OK, ${VAR}='${!VAR}'"
22+
done
23+
echo -n "Locating oe-console ... "
24+
cd source || exit 1
25+
if [ -f 'bin/oe-console' ]; then
26+
OE_CONSOLE='bin/oe-console'
27+
else
28+
if [ -f 'vendor/bin/oe-console' ]; then
29+
OE_CONSOLE='vendor/bin/oe-console'
30+
else
31+
error "Can't find oe-console in bin or vendor/bin!"
32+
fi
33+
fi
34+
echo "OK, using '${OE_CONSOLE}'"
35+
if [ -z "${OXID_BUILD_DIRECTORY}" ]; then
36+
echo "OXID_BUILD_DIRECTORY is not set, setting it to /var/www/var/cache/"
37+
export OXID_BUILD_DIRECTORY="/var/www/var/cache/"
38+
else
39+
echo "OXID_BUILD_DIRECTORY is set to '${OXID_BUILD_DIRECTORY}'"
40+
fi
41+
if [ ! -d "${OXID_BUILD_DIRECTORY/\/var\/www/source}" ]; then
42+
echo "Creating '${OXID_BUILD_DIRECTORY}'"
43+
docker compose "${install_container_method}" -T \
44+
${install_container_options} \
45+
"${install_container_name}" \
46+
mkdir -p "${OXID_BUILD_DIRECTORY}"
47+
fi
48+
}
49+
50+
init
51+
cp vendor/oxid-esales/oxideshop-ce/.env.dist ./.env
52+
53+
# Run Install Shop
54+
docker compose "${install_container_method}" -T \
55+
${install_container_options} \
56+
"${install_container_name}" \
57+
${OE_CONSOLE} oe:database:reset --force
58+
59+
# Activate iDebug
60+
if [ "${install_config_idebug}" == 'true' ]; then
61+
export OXID_DEBUG_MODE="true"
62+
fi
63+
64+
# Activate theme
65+
docker compose "${install_container_method}" -T \
66+
${install_container_options} \
67+
"${install_container_name}" \
68+
${OE_CONSOLE} oe:theme:activate apex
69+
70+
# Output PHP error log
71+
if [ -s data/php/logs/error_log.txt ]; then
72+
echo -e "\033[0;35mPHP error log\033[0m"
73+
cat data/php/logs/error_log.txt
74+
fi
75+
exit 0

.github/workflows/dispatch_module.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
- 'PHP8.3/MariaDb11'
1616
- 'PHP8.4/MySQL8.0'
1717
- 'PHP8.4/MariaDb11'
18-
default: 'PHP8.3/MySQL8.0'
18+
default: 'PHP8.4/MySQL8.0'
1919
description: 'Limit to one PHP/MySQL combination'
2020

2121
jobs:
@@ -44,7 +44,7 @@ jobs:
4444
;;
4545
esac
4646
# shellcheck disable=SC2088
47-
TESTPLAN="~/defaults/7.4.x.yaml,${LIMIT}~/graphql-base.yaml"
47+
TESTPLAN="~/defaults/8.0.x.yaml,${LIMIT}~/graphql-base.yaml"
4848
echo "testplan=${TESTPLAN}" | tee -a "${GITHUB_OUTPUT}"
4949
5050
dispatch_stable:

.github/workflows/schedule_module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
call_matrix:
99
uses: OXID-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4
1010
with:
11-
testplan: '~/defaults/7.4.x.yaml,~/graphql-base.yaml'
11+
testplan: '~/defaults/8.0.x.yaml,~/graphql-base.yaml'
1212
runs_on: '"ubuntu-latest"'
1313
defaults: 'v4'
1414
plan_folder: '.github/oxid-esales'

.github/workflows/trigger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
call_matrix:
99
uses: OXID-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4
1010
with:
11-
testplan: '~/defaults/7.4.x.yaml,~/defaults/php8.3_mysql8.0_only.yaml,~/graphql-base.yaml'
11+
testplan: '~/defaults/8.0.x.yaml,~/defaults/php8.4_mysql8.0_only.yaml,~/graphql-base.yaml'
1212
runs_on: '"ubuntu-latest"'
1313
defaults: 'v4'
1414
plan_folder: '.github/oxid-esales'

CHANGELOG-alpha2.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Undecided] - unreleased
8+
9+
### Changed
10+
- Update module to work with OXID eShop 8.0-alpha2
11+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This assumes you have OXID eShop (at least `OXID-eSales/oxideshop_ce: v7.4.0` co
2424

2525
## Branch Compatibility
2626

27+
* b-8.0.x-alpha2 branch is compatible with b-8.0.x shop compilation branches
2728
* b-7.4.x branch is compatible with b-7.4.x shop compilation branches
2829
* 11.0.x versions (or b-7.3.x branch) are compatible with latest shop compilation 7.3.x resp. b-7.3.x shop compilation branches
2930
* 10.0.x versions (or b-7.2.x branch) are compatible with latest shop compilation 7.2.x resp. b-7.2.x shop compilation branches

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require-dev": {
1919
"phpunit/phpunit": "^11.4",
2020
"ext-xdebug": "*",
21-
"oxid-esales/oxideshop-ce": "dev-b-7.4.x",
21+
"oxid-esales/oxideshop-ce": "dev-b-8.0.x",
2222
"phpstan/phpstan": "^1.10",
2323
"squizlabs/php_codesniffer": "3.*",
2424
"phpmd/phpmd": "^2.11",
@@ -28,15 +28,15 @@
2828
"codeception/module-db": "*",
2929
"codeception/codeception": "^5.0",
3030
"codeception/module-asserts": "^3.0",
31-
"oxid-esales/codeception-modules": "dev-b-7.4.x",
32-
"oxid-esales/codeception-page-objects": "dev-b-7.4.x",
33-
"oxid-esales/developer-tools": "dev-b-7.4.x",
34-
"oxid-esales/oxideshop-db-views-generator": "dev-b-7.4.x",
35-
"oxid-esales/oxideshop-doctrine-migration-wrapper": "dev-b-7.4.x",
36-
"oxid-esales/oxideshop-unified-namespace-generator": "dev-b-7.4.x"
31+
"oxid-esales/codeception-modules": "dev-b-8.0.x",
32+
"oxid-esales/codeception-page-objects": "dev-b-8.0.x",
33+
"oxid-esales/developer-tools": "dev-b-8.0.x",
34+
"oxid-esales/oxideshop-db-views-generator": "dev-b-8.0.x",
35+
"oxid-esales/oxideshop-doctrine-migration-wrapper": "dev-b-8.0.x",
36+
"oxid-esales/oxideshop-unified-namespace-generator": "dev-b-8.0.x"
3737
},
3838
"conflict": {
39-
"oxid-esales/oxideshop-ce": "<7.4"
39+
"oxid-esales/oxideshop-ce": "<8.0"
4040
},
4141
"autoload": {
4242
"psr-4": {

recipes/setup-development.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ docker compose up --build -d php
3737

3838
docker compose exec -T php git config --global --add safe.directory /var/www
3939

40-
$SCRIPT_PATH/parts/shared/require_shop_edition_packages.sh -e"${edition}" -v"dev-b-7.4.x"
41-
$SCRIPT_PATH/parts/shared/require_twig_components.sh -e"${edition}" -b"b-7.4.x"
42-
$SCRIPT_PATH/parts/shared/require.sh -n"oxid-esales/developer-tools" -v"dev-b-7.4.x"
43-
$SCRIPT_PATH/parts/shared/require.sh -n"oxid-esales/oxideshop-doctrine-migration-wrapper" -v"dev-b-7.4.x"
44-
$SCRIPT_PATH/parts/shared/require_theme.sh -t"apex" -b"b-7.4.x"
40+
$SCRIPT_PATH/parts/shared/require_shop_edition_packages.sh -e"${edition}" -v"dev-b-8.0.x"
41+
$SCRIPT_PATH/parts/shared/require_twig_components.sh -e"${edition}" -b"b-8.0.x"
42+
$SCRIPT_PATH/parts/shared/require.sh -n"oxid-esales/developer-tools" -v"dev-b-8.0.x"
43+
$SCRIPT_PATH/parts/shared/require.sh -n"oxid-esales/oxideshop-doctrine-migration-wrapper" -v"dev-b-8.0.x"
44+
$SCRIPT_PATH/parts/shared/require_theme.sh -t"apex" -b"b-8.0.x"
4545

4646
git clone -b 11.0-en https://github.com/OXID-eSales/oxapi-documentation source/documentation/oxapi-documentation
4747
make docpath=./source/documentation/oxapi-documentation addsphinxservice
@@ -54,7 +54,7 @@ perl -pi\
5454
-e 'print "SetEnvIf Authorization \"(.*)\" HTTP_AUTHORIZATION=\$1\n\n" if $. == 1'\
5555
source/source/.htaccess
5656

57-
$SCRIPT_PATH/parts/shared/setup_database.sh --no-demodata
57+
docker compose exec -T php vendor/bin/oe-console oe:database:reset --force
5858

5959
docker compose exec -T php vendor/bin/oe-console oe:module:install ./
6060
docker compose exec -T php vendor/bin/oe-eshop-doctrine_migration migrations:migrate

0 commit comments

Comments
 (0)