-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Switch to light workflows using scripts * Use install script * Determine the branch based on the changelog, if the branch name is problematic
- Loading branch information
Showing
30 changed files
with
566 additions
and
299 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This config depends on the defaults.yml testplan | ||
# Only diverging settings are defined here | ||
|
||
skip: &skip | ||
matrix: | ||
testplan: 'skip' | ||
skip: true | ||
|
||
phpunit: *skip | ||
codeception: *skip | ||
sonarcloud: *skip | ||
phpcs_tests: *skip | ||
yamllint: *skip | ||
actionlint: *skip | ||
|
||
runtest: | ||
matrix: | ||
testplan: '["-"]' | ||
|
||
finish: | ||
slack_title: 'Deprecated Tests Shop CE on {{ .Github.Repository }} by {{ .Github.Actor }}' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
# shellcheck disable=SC2154 | ||
# Lower case environment variables are passed from the workflow and used here | ||
# We use a validation loop in init to ensure, they're set | ||
# shellcheck disable=SC2086 | ||
# We want install_container_options to count as multiple arguments | ||
set -e | ||
|
||
function error() { | ||
echo -e "\033[0;31m${1}\033[0m" | ||
exit 1 | ||
} | ||
|
||
function init() { | ||
for VAR in install_container_method install_container_options install_container_name \ | ||
install_config_idebug install_is_enterprise; do | ||
echo -n "Checking, if $VAR is set ..." | ||
if [ -z ${VAR+x} ]; then | ||
error "Variable '${VAR}' not set" | ||
fi | ||
echo "OK, ${VAR}='${!VAR}'" | ||
done | ||
echo -n "Locating oe-console ... " | ||
cd source || exit 1 | ||
if [ -f 'bin/oe-console' ]; then | ||
OE_CONSOLE='bin/oe-console' | ||
else | ||
if [ -f 'vendor/bin/oe-console' ]; then | ||
OE_CONSOLE='vendor/bin/oe-console' | ||
else | ||
error "Can't find oe-console in bin or vendor/bin!" | ||
fi | ||
fi | ||
echo "OK, using '${OE_CONSOLE}'" | ||
} | ||
|
||
init | ||
# Run Install Shop | ||
docker compose "${install_container_method}" -T \ | ||
${install_container_options} \ | ||
"${install_container_name}" \ | ||
${OE_CONSOLE} oe:setup:shop \ | ||
--db-host mysql \ | ||
--db-port 3306 \ | ||
--db-name example \ | ||
--db-user root \ | ||
--db-password root \ | ||
--shop-url http://localhost.local/ \ | ||
--shop-directory /var/www/source \ | ||
--compile-directory /var/www/source/tmp | ||
|
||
# Activate iDebug | ||
if [ "${install_config_idebug}" == 'true' ]; then | ||
if [ -f source/source/config.inc.php ]; then | ||
perl -pi -e 's#iDebug = 0;#iDebug = -1;#g;' source/source/config.inc.php | ||
fi | ||
if [ -f source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php ]; then | ||
perl -pi -e 's#iDebug = 0;#iDebug = -1;#g;' source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php | ||
fi | ||
fi | ||
|
||
# Activate theme | ||
if [ "${install_is_enterprise}" == 'true' ]; then | ||
docker compose "${install_container_method}" -T \ | ||
${install_container_options} \ | ||
"${install_container_name}" \ | ||
${OE_CONSOLE} oe:theme:activate apex | ||
fi | ||
|
||
# Output PHP error log | ||
if [ -s data/php/logs/error_log.txt ]; then | ||
echo -e "\033[0;35mPHP error log\033[0m" | ||
cat data/php/logs/error_log.txt | ||
fi | ||
exit 0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# {{ $org := "oxid-esales" }}organisation: {{ $org }} | ||
# {{ $name := "oxideshop-ce" }}name: {{ $name }} | ||
# {{ $repo := "OXID-eSales/oxideshop_ce" }}repo: {{ $repo }} | ||
|
||
install: | ||
method: script | ||
cache: | ||
prepared_shop: true | ||
container: | ||
options: '-e SHOP_PATH=vendor/{{ $org}}/{{ $name }}/source' | ||
composer: | ||
transform: | | ||
{ | ||
"preferred-install": { | ||
"oxid-esales/*": "source", | ||
"oxid-professional-services/*": "source", | ||
"ddoe/*": "source" | ||
}, | ||
"require": { | ||
"oxid-esales/twig-component": "{{ .Data.global.composer.dev_ref }}", | ||
"oxid-esales/twig-admin-theme": "{{ .Data.global.composer.dev_ref }}", | ||
"oxid-esales/apex-theme": "{{ .Data.global.composer.dev_ref }}", | ||
"{{ $org }}/{{ $name }}": "{{ .Data.global.composer.ref_name }}" | ||
}, | ||
"repositories": { | ||
"{{ $org }}/{{ $name }}": { | ||
"type": "git", | ||
"url": "https://github.com/{{ $repo }}.git" | ||
} | ||
} | ||
} | ||
output: | ||
files: | | ||
docker-compose.yml | ||
source/composer.json* | ||
source/composer.lock | ||
source/source/config.inc.php | ||
source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php | ||
data/php/logs/error_log.txt | ||
runscript: &runscript | ||
matrix: | ||
script: | | ||
[ | ||
"shop:~/unit.sh", | ||
"shop:~/integration.sh", | ||
"shop:~/codeception.sh", | ||
"setup:~/shop-setup.sh" | ||
] | ||
shop: &shop | ||
path: 'vendor/{{ $org}}/{{ $name }}' | ||
container: | ||
options: '-e XDEBUG_MODE=coverage -e GITHUB_EVENT_NAME={{ .Github.EventName }} -e GITHUB_BASE_REF={{ .Github.BaseRef }} -e GITHUB_REF={{ .Github.Ref }} -e GITHUB_REF_NAME={{ .Github.RefName }}' | ||
setup: | ||
load_shop: '{{ .Data.install_shop_with_modules.cache.prepared_shop_prefix }}' | ||
path: 'vendor/{{ $org}}/{{ $name }}' | ||
custom_script_container: | | ||
cd vendor/oxid-esales/oxideshop-ce | ||
composer config -g github-oauth.github.com "${GITHUB_TOKEN}" | ||
composer update --no-interaction | ||
runslim: | ||
<<: *runscript | ||
matrix: | ||
script: '["shop:~/php-cs-report.sh"]' | ||
|
||
sonarcloud: | ||
matrix: | ||
testplan: '["-","~/sonarcloud_oxideshop_ce_internal.yaml"]' | ||
strip_path: '/var/www/vendor/{{ print $org }}/{{ print $name}}/' | ||
|
||
finish: | ||
slack_title: 'Shop CE ({{ .Data.global.git.shop_ref }}) by {{ .Github.Actor }}' | ||
slack_compact: true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.