Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflows for 7.2 and replace multiple triggers with one
Browse files Browse the repository at this point in the history
joernott committed Mar 27, 2024
1 parent f966437 commit 110e91a
Showing 13 changed files with 160 additions and 20 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/dispatch_matrix_ce.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ on:
options:
- 7.0.x
- 7.1.x
- 7.2.x
- 8.0.x
- smarty 7.0.x
- use custom testplan
@@ -66,27 +67,14 @@ jobs:
exit 1
;;
esac
# shellcheck disable=SC2088
case '${{ inputs.scenario}}' in
"7.0.x")
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash
TESTPLAN="~/defaults/7.0.x.yml,${LIMIT}~/shop_ce_70x.yml"
;;
"7.1.x")
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash
TESTPLAN="~/defaults/7.1.x.yml,${LIMIT}~/shop_ce.yml"
;;
"8.0.x")
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash
TESTPLAN="${LIMIT}~/shop_ce.yml"
;;
"smarty 7.0.x")
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash
TESTPLAN="~/defaults/7.0.x.yml,${LIMIT}~/smarty_7.0.x.yml"
;;
"use custom testplan")
# shellcheck disable=SC2088 # Tilde expansion happens in the workflow and not by bash
TESTPLAN="${{ inputs.custom_testplan }}"
;;
"7.0.x") TESTPLAN="~/defaults/7.0.x.yml,${LIMIT}~/shop_ce_70x.yml" ;;
"7.1.x") TESTPLAN="~/defaults/7.1.x.yml,${LIMIT}~/shop_ce.yml" ;;
"7.2.x") TESTPLAN="~/defaults/7.2.x.yml,${LIMIT}~/shop_ce.yml" ;;
"8.0.x") TESTPLAN="${LIMIT}~/shop_ce.yml" ;;
"smarty 7.0.x") TESTPLAN="~/defaults/7.0.x.yml,${LIMIT}~/smarty_7.0.x.yml" ;;
"use custom testplan") TESTPLAN="${{ inputs.custom_testplan }}" ;;
*)
echo "Illegal choice, fix the workflow"
exit 1
File renamed without changes.
100 changes: 100 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Nightly runs
# Matrix workflow using re-usable github actions

on:
schedule:
- cron: '17 23 * * 1-5'

jobs:
oxideshop_ce_70x_nightly:
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4
with:
testplan: '~/defaults/7.0.x.yml,~/defaults/scheduled.yml,~/shop_ce_70x.yml'
runs_on: '"ubuntu-latest"'
defaults: 'v4'
plan_folder: '.github/oxid-esales'
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 }}

oxideshop_ce_smarty_70x_nightly:
needs: oxideshop_ce_70x_nightly
if: always()
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4
with:
testplan: '~/defaults/7.0.x.yml,~/defaults/scheduled.yml,~/smarty_7.0.x.yml'
runs_on: '"ubuntu-latest"'
defaults: 'v4'
plan_folder: '.github/oxid-esales'
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 }}

oxideshop_ce_71x_nightly:
needs: oxideshop_ce_smarty_70x_nightly
if: always()
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4
with:
testplan: '~/defaults/7.1.x.yml,~/defaults/scheduled.yml,~/shop_ce.yml'
runs_on: '"ubuntu-latest"'
defaults: 'v4'
plan_folder: '.github/oxid-esales'
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 }}

oxideshop_ce_72x_nightly:
needs: oxideshop_ce_71x_nightly
if: always()
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4
with:
testplan: '~/defaults/7.2.x.yml,~/defaults/scheduled.yml,~/shop_ce.yml'
runs_on: '"ubuntu-latest"'
defaults: 'v4'
plan_folder: '.github/oxid-esales'
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 }}

oxideshop_ce_80x_nightly:
needs: oxideshop_ce_72x_nightly
if: always()
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4
with:
testplan: '~/defaults/scheduled.yml,~/shop_ce.yml'
runs_on: '"ubuntu-latest"'
defaults: 'v4'
plan_folder: '.github/oxid-esales'
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 }}
52 changes: 52 additions & 0 deletions .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Auto trigger on push or pull requests
# Matrix workflow using re-usable github actions

on:
pull_request: {}
push: {}

jobs:
build_testplan:
runs-on: 'ubuntu-latest'
outputs:
testplan: '${{ steps.build.outputs.testplan }}'
steps:
- name: 'Build testplan'
id: build
run: |

Check failure on line 16 in .github/workflows/trigger.yml

GitHub Actions / shop_ce / actionlint

shellcheck reported issue in this script: SC2088:warning:8:34: Tilde does not expand in quotes. Use $HOME

Check failure on line 16 in .github/workflows/trigger.yml

GitHub Actions / shop_ce / actionlint

shellcheck reported issue in this script: SC2088:warning:9:34: Tilde does not expand in quotes. Use $HOME

Check failure on line 16 in .github/workflows/trigger.yml

GitHub Actions / shop_ce / actionlint

shellcheck reported issue in this script: SC2088:warning:10:34: Tilde does not expand in quotes. Use $HOME

Check failure on line 16 in .github/workflows/trigger.yml

GitHub Actions / shop_ce / actionlint

shellcheck reported issue in this script: SC2088:warning:11:34: Tilde does not expand in quotes. Use $HOME
# Build testplan
if [ '${{ github.event_name }}' == 'pull_request' ]; then
REF_TO_CHECK=${{ github.base_ref }}
else
REF_TO_CHECK=${{ github.ref }}
fi
case "${REF_TO_CHECK}" in
refs/heads/b-7.0.x*) TESTPLAN="~/defaults/7.0.x.yml,~/shop_ce_70x.yml" ;;
refs/heads/b-7.1.x*) TESTPLAN="~/defaults/7.1.x.yml,~/shop_ce.yml" ;;
refs/heads/b-7.2.x*) TESTPLAN="~/defaults/7.2.x.yml,~/shop_ce.yml" ;;
refs/heads/b-8.0.x*) TESTPLAN="~/shop_ce.yml" ;;
*)
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"
exit 1
;;
esac
echo "testplan=${TESTPLAN}" | tee -a "${GITHUB_OUTPUT}"
shop_ce:
needs: build_testplan
uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yml@v4
with:
testplan: ${{ needs.build_testplan.outputs.testplan }}
runs_on: '"ubuntu-latest"'
defaults: 'v4'
plan_folder: '.github/oxid-esales'
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 }}

0 comments on commit 110e91a

Please sign in to comment.