Skip to content

Commit

Permalink
Merge branch 'b-7.2.x' into b-7.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kenariosz committed Nov 20, 2024
2 parents 22c2ba7 + 62bd295 commit 363823c
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 48 deletions.
48 changes: 25 additions & 23 deletions .github/oxid-esales/twig-component.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
install: &install
install:
method: script
script: 'source/.github/oxid-esales/install.sh'
git:
ref: '{{ .Data.global.git.default_ref }}'
script: 'source/vendor/oxid-esales/oxideshop-ce/.github/oxid-esales/install.sh'
composer:
early: 'skip'
root_url: ''
transform: |
{
"config": {
"github-protocols": ["https"]
},
"preferred-install": {
"oxid-esales/*": "source",
"oxid-professional-services/*": "source",
"ddoe/*": "source"
"oxid-esales/*": "source"
},
"require": {
"oxid-esales/twig-component": "dev-{{ .Data.global.git.safe_ref_name }}",
"oxid-esales/twig-admin-theme": "{{ .Data.global.composer.dev_ref }}",
"oxid-esales/apex-theme": "{{ .Data.global.composer.dev_ref }}"
"oxid-esales/oxideshop-ce": "{{ .Data.global.composer.dev_ref }}",
"oxid-esales/twig-component": "dev-{{ .Data.global.git.safe_ref_name }}",
"oxid-esales/twig-admin-theme": "{{ .Data.global.composer.dev_ref }}",
"oxid-esales/apex-theme": "{{ .Data.global.composer.dev_ref }}"
},
"require-dev":{
"oxid-esales/developer-tools":"{{ .Data.global.composer.dev_ref }}",
"mikey179/vfsstream": "~1.6.8",
"phpspec/prophecy-phpunit": "^v2.0.1",
"phpunit/phpunit": "^10.4"
},
"autoload-dev":{
"psr-4":{
"OxidEsales\\Twig\\Tests\\": "./vendor/oxid-esales/twig-component/tests"
}
}
}
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
install_shop_with_modules: *install

runscript: &runscript
runscript:
matrix:
script: |
[
"twig:~/unit.sh",
"twig:~/integration.sh"
]
composer:
early: 'skip'
twig:
path: 'vendor/oxid-esales/twig-component'

Expand All @@ -45,5 +47,5 @@ sonarcloud:
testplan: 'skip'

finish:
slack_title: 'Twig Component ({{ .Data.github.RefName }}) by {{ .Github.Actor }}'
slack_title: 'Twig Component ({{ .Data.global.git.safe_ref_name }}) by {{ .Github.Actor }}'
slack_compact: true
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Manual run
# Matrix workflow using re-usable github actions

on:
workflow_dispatch:
Expand All @@ -13,7 +12,7 @@ on:
- 7.3.x
- 8.0.x
- use custom testplan
default: '8.0.x'
default: '7.2.x'
description: 'Choose test scenario'
limit:
type: choice
Expand All @@ -27,12 +26,12 @@ on:
- 'PHP8.2/MySQL8.0'
- 'PHP8.3/MySQL5.7'
- 'PHP8.3/MySQL8.0'
description:
default: 'PHP8.1/MySQL5.7'
description: 'Limit run to one PHP/MySQL combination'
default: 'PHP8.3/MySQL8.0'
custom_testplan:
type: string
description: 'Custom testplan'
default: '~/defaults/php8.2_mysql5.7_only.yaml,~/twig-component.yaml'
default: '~/defaults/php8.3_mysql8.0_only.yaml,~/twig-component.yaml'
runs_on:
type: string
description: 'JSON string/array describing the runner'
Expand All @@ -54,7 +53,7 @@ jobs:
run: |
# Build testplan
# shellcheck disable=SC2088
PLAN="~/twig-component.yaml,~/defaults/component.yaml"
PLAN="~/twig-component.yaml"
# shellcheck disable=SC2088
case "${{ inputs.limit }}" in
"no") LIMIT='';;
Expand Down Expand Up @@ -92,7 +91,7 @@ jobs:
with:
testplan: ${{ needs.build_testplan.outputs.testplan }}
runs_on: ${{ inputs.runs_on }}
defaults: 'v0'
defaults: 'v4'
plan_folder: '.github/oxid-esales'
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
title: 'twig component 7.0.x-weekly'
finish:
slack_title: 'Weekly Twig Component 7.0.x on {{ .Github.Repository }}'
use_scheduled_slack_channel: true
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -27,6 +28,7 @@ jobs:
enterprise_github_token: ${{ secrets.enterprise_github_token }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_SCHEDULED_WEBHOOK_URL: ${{ secrets.SLACK_SCHEDULED_WEBHOOK_URL }}

twig_component_71x_weekly:
if: always()
Expand All @@ -41,6 +43,7 @@ jobs:
title: 'twig component 7.1.x-weekly'
finish:
slack_title: 'Weekly Twig Component 7.1.x on {{ .Github.Repository }}'
use_scheduled_slack_channel: true
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -50,6 +53,7 @@ jobs:
enterprise_github_token: ${{ secrets.enterprise_github_token }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_SCHEDULED_WEBHOOK_URL: ${{ secrets.SLACK_SCHEDULED_WEBHOOK_URL }}

twig_component_72x_weekly:
if: always()
Expand All @@ -64,6 +68,7 @@ jobs:
title: 'twig component 7.2.x-weekly'
finish:
slack_title: 'Weekly Twig Component 7.2.x on {{ .Github.Repository }}'
use_scheduled_slack_channel: true
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -73,6 +78,32 @@ jobs:
enterprise_github_token: ${{ secrets.enterprise_github_token }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_SCHEDULED_WEBHOOK_URL: ${{ secrets.SLACK_SCHEDULED_WEBHOOK_URL }}

twig_component_73x_weekly:
if: always()
uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4
with:
testplan: '~/defaults/7.3.x.yaml,~/defaults/scheduled.yaml,~/twig-component.yaml'
runs_on: '"ubuntu-latest"'
defaults: 'v4'
plan_folder: '.github/oxid-esales'
custom_testplan_yaml: |
global:
title: 'twig component 7.3.x-weekly'
finish:
slack_title: 'Weekly Twig Component 7.3.x on {{ .Github.Repository }}'
use_scheduled_slack_channel: true
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
CACHE_ENDPOINT: ${{ secrets.CACHE_ENDPOINT }}
CACHE_ACCESS_KEY: ${{ secrets.CACHE_ACCESS_KEY }}
CACHE_SECRET_KEY: ${{ secrets.CACHE_SECRET_KEY }}
enterprise_github_token: ${{ secrets.enterprise_github_token }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_SCHEDULED_WEBHOOK_URL: ${{ secrets.SLACK_SCHEDULED_WEBHOOK_URL }}

twig_component_73x_weekly:
if: always()
Expand Down Expand Up @@ -110,6 +141,7 @@ jobs:
title: 'twig component 8.0.x-weekly'
finish:
slack_title: 'Weekly Twig Component 8.0.x on {{ .Github.Repository }}'
use_scheduled_slack_channel: true
secrets:
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -119,3 +151,4 @@ jobs:
enterprise_github_token: ${{ secrets.enterprise_github_token }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_SCHEDULED_WEBHOOK_URL: ${{ secrets.SLACK_SCHEDULED_WEBHOOK_URL }}
19 changes: 1 addition & 18 deletions .github/workflows/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,7 @@ jobs:
*)
echo "Can't match ${REF_TO_CHECK} to a version, can't determine test plan."
echo "Branch names should start with b-<major>.<minor>.x"
echo "Using the shop changelog to determine the shop version"
git clone --depth 2 "${{ github.repositoryUrl }}" --branch "${{ github.ref_name}}" --single-branch .tmp
if [ -f .tmp/CHANGELOG-3.x.md ]; then
TESTPLAN="~/defaults/8.0.x.yaml,${LIMIT}~/twig-component.yaml"
elif [ -f .tmp/CHANGELOG-2.x.md ]; then
TESTPLAN="~/defaults/7.3.x.yaml,${LIMIT}~/twig-component.yaml"
elif [ -f .tmp/CHANGELOG-2.x.md ]; then
TESTPLAN="~/defaults/7.2.x.yaml,${LIMIT}~/twig-component.yaml"
elif [ -f .tmp/CHANGELOG-2.x.md ]; then
TESTPLAN="~/defaults/7.1.x.yaml,${LIMIT}~/twig-component.yaml"
elif [ -f .tmp/CHANGELOG.md ]; then
TESTPLAN="~/defaults/7.0.x.yaml,${LIMIT}~/twig-component.yaml"
else
echo "Could not find any of CHANGELOG-8.0, CHANGELOG-7.2, CHANGELOG-71. or CHANGELOG-7.0"
echo "Still can't determine the test plan"
exit 1
fi
rm -rf .tmp
exit 1
;;
esac
echo "testplan=${TESTPLAN}" | tee -a "${GITHUB_OUTPUT}"
Expand Down

0 comments on commit 363823c

Please sign in to comment.