From dcd2baf99a19fb4416639613ebe9f41dd4d06a14 Mon Sep 17 00:00:00 2001 From: "release-github-action[bot]" <154503118+release-github-action[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 12:15:13 +0200 Subject: [PATCH] Update github-actions to 4.14.9 (#163) * Add docker logs output * Move debug generation for install script before script execution * Add comment for module activation to generate the banner in the debug script * Output php error log after install, if it is not empty * Fix variable substitution in templates * Add echo to indicate which shop is cloned in prepare_shop --- .github/oxid-esales/defaults/7.0.x.yaml | 11 +++--- .github/oxid-esales/defaults/7.0.x.yml | 11 +++--- .github/oxid-esales/defaults/7.1.x.yaml | 11 +++--- .github/oxid-esales/defaults/7.1.x.yml | 11 +++--- .github/oxid-esales/defaults/7.2.x.yaml | 11 +++--- .github/oxid-esales/defaults/7.2.x.yml | 11 +++--- .github/oxid-esales/defaults/defaults.yaml | 5 +++ .github/oxid-esales/defaults/defaults.yml | 5 +++ .../oxid-esales/defaults/defaults_light.yaml | 1 + .../oxid-esales/defaults/defaults_light.yml | 1 + .github/oxid-esales/defaults/ee.yaml | 8 ++++- .github/oxid-esales/defaults/ee.yml | 8 ++++- .github/oxid-esales/defaults/pe.yaml | 8 ++++- .github/oxid-esales/defaults/pe.yml | 8 ++++- .github/oxid-esales/defaults/scheduled.yaml | 5 ++- .github/oxid-esales/defaults/scheduled.yml | 5 ++- .../workflows/universal_workflow_light.yaml | 34 ++++++++++++------- .../workflows/universal_workflow_light.yml | 34 ++++++++++++------- prepare_shop/action.yaml | 4 ++- run_test_script/action.yaml | 5 +++ stop_shop/action.yaml | 11 ++++++ 21 files changed, 153 insertions(+), 55 deletions(-) diff --git a/.github/oxid-esales/defaults/7.0.x.yaml b/.github/oxid-esales/defaults/7.0.x.yaml index 1713cce3..260f3642 100644 --- a/.github/oxid-esales/defaults/7.0.x.yaml +++ b/.github/oxid-esales/defaults/7.0.x.yaml @@ -13,7 +13,7 @@ global: composer: &composer dev_ref: &dev_ref dev-b-7.0.x -prepare_shop: +install: &install matrix: *matrix git: *git composer: @@ -32,19 +32,22 @@ prepare_shop: } } +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + install_shop: matrix: *matrix git: *git +install_shop_with_modules: *install + install_module: matrix: *matrix git: module: ref: *default_ref composer: *composer - -install_shop_with_modules: - matrix: *matrix +# END Deprecated runscript: matrix: *matrix diff --git a/.github/oxid-esales/defaults/7.0.x.yml b/.github/oxid-esales/defaults/7.0.x.yml index 1713cce3..260f3642 100644 --- a/.github/oxid-esales/defaults/7.0.x.yml +++ b/.github/oxid-esales/defaults/7.0.x.yml @@ -13,7 +13,7 @@ global: composer: &composer dev_ref: &dev_ref dev-b-7.0.x -prepare_shop: +install: &install matrix: *matrix git: *git composer: @@ -32,19 +32,22 @@ prepare_shop: } } +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + install_shop: matrix: *matrix git: *git +install_shop_with_modules: *install + install_module: matrix: *matrix git: module: ref: *default_ref composer: *composer - -install_shop_with_modules: - matrix: *matrix +# END Deprecated runscript: matrix: *matrix diff --git a/.github/oxid-esales/defaults/7.1.x.yaml b/.github/oxid-esales/defaults/7.1.x.yaml index 18b9b1fc..e589fc1e 100644 --- a/.github/oxid-esales/defaults/7.1.x.yaml +++ b/.github/oxid-esales/defaults/7.1.x.yaml @@ -13,7 +13,7 @@ global: composer: &composer dev_ref: &dev_ref dev-b-7.1.x -prepare_shop: +install: &install matrix: *matrix git: *git composer: @@ -32,19 +32,22 @@ prepare_shop: } } +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + install_shop: matrix: *matrix git: *git +install_shop_with_modules: *install + install_module: matrix: *matrix git: module: ref: *default_ref composer: *composer - -install_shop_with_modules: - matrix: *matrix +# END Deprecated runscript: matrix: *matrix_slim diff --git a/.github/oxid-esales/defaults/7.1.x.yml b/.github/oxid-esales/defaults/7.1.x.yml index 18b9b1fc..e589fc1e 100644 --- a/.github/oxid-esales/defaults/7.1.x.yml +++ b/.github/oxid-esales/defaults/7.1.x.yml @@ -13,7 +13,7 @@ global: composer: &composer dev_ref: &dev_ref dev-b-7.1.x -prepare_shop: +install: &install matrix: *matrix git: *git composer: @@ -32,19 +32,22 @@ prepare_shop: } } +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + install_shop: matrix: *matrix git: *git +install_shop_with_modules: *install + install_module: matrix: *matrix git: module: ref: *default_ref composer: *composer - -install_shop_with_modules: - matrix: *matrix +# END Deprecated runscript: matrix: *matrix_slim diff --git a/.github/oxid-esales/defaults/7.2.x.yaml b/.github/oxid-esales/defaults/7.2.x.yaml index 92be9b24..0cbecef5 100644 --- a/.github/oxid-esales/defaults/7.2.x.yaml +++ b/.github/oxid-esales/defaults/7.2.x.yaml @@ -14,7 +14,7 @@ global: composer: &composer dev_ref: &dev_ref dev-b-7.2.x -prepare_shop: +install: &install matrix: *matrix git: *git composer: @@ -33,19 +33,22 @@ prepare_shop: } } +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + install_shop: matrix: *matrix git: *git +install_shop_with_modules: *install + install_module: matrix: *matrix git: module: ref: *default_ref composer: *composer - -install_shop_with_modules: - matrix: *matrix +# END Deprecated runscript: matrix: *matrix diff --git a/.github/oxid-esales/defaults/7.2.x.yml b/.github/oxid-esales/defaults/7.2.x.yml index 92be9b24..0cbecef5 100644 --- a/.github/oxid-esales/defaults/7.2.x.yml +++ b/.github/oxid-esales/defaults/7.2.x.yml @@ -14,7 +14,7 @@ global: composer: &composer dev_ref: &dev_ref dev-b-7.2.x -prepare_shop: +install: &install matrix: *matrix git: *git composer: @@ -33,19 +33,22 @@ prepare_shop: } } +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + install_shop: matrix: *matrix git: *git +install_shop_with_modules: *install + install_module: matrix: *matrix git: module: ref: *default_ref composer: *composer - -install_shop_with_modules: - matrix: *matrix +# END Deprecated runscript: matrix: *matrix diff --git a/.github/oxid-esales/defaults/defaults.yaml b/.github/oxid-esales/defaults/defaults.yaml index 3c4388de..ca28fd8a 100644 --- a/.github/oxid-esales/defaults/defaults.yaml +++ b/.github/oxid-esales/defaults/defaults.yaml @@ -243,6 +243,7 @@ install_shop: output: &install_output files: | docker-compose.yml + docker*.log source/composer.json* source/composer.lock source/source/config.inc.php @@ -286,6 +287,7 @@ install_module: output: files: | docker-compose.yml + docker*.log source/composer.json* source/composer.lock source/source/config.inc.php @@ -371,6 +373,7 @@ phpunit: output: # Which files should be archived files: | + docker*.log source/source/log/oxideshop.log data/php/logs/error_log.txt job_status*.txt @@ -465,6 +468,7 @@ codeception: output: files: | docker-compose.yml + docker*.log source/composer.json source/composer.lock source/source/config.inc.php @@ -531,6 +535,7 @@ runtest: output: files: | + docker*.log source/unit.cov source/source/log/oxideshop.log source/test_config.yml diff --git a/.github/oxid-esales/defaults/defaults.yml b/.github/oxid-esales/defaults/defaults.yml index 3c4388de..ca28fd8a 100644 --- a/.github/oxid-esales/defaults/defaults.yml +++ b/.github/oxid-esales/defaults/defaults.yml @@ -243,6 +243,7 @@ install_shop: output: &install_output files: | docker-compose.yml + docker*.log source/composer.json* source/composer.lock source/source/config.inc.php @@ -286,6 +287,7 @@ install_module: output: files: | docker-compose.yml + docker*.log source/composer.json* source/composer.lock source/source/config.inc.php @@ -371,6 +373,7 @@ phpunit: output: # Which files should be archived files: | + docker*.log source/source/log/oxideshop.log data/php/logs/error_log.txt job_status*.txt @@ -465,6 +468,7 @@ codeception: output: files: | docker-compose.yml + docker*.log source/composer.json source/composer.lock source/source/config.inc.php @@ -531,6 +535,7 @@ runtest: output: files: | + docker*.log source/unit.cov source/source/log/oxideshop.log source/test_config.yml diff --git a/.github/oxid-esales/defaults/defaults_light.yaml b/.github/oxid-esales/defaults/defaults_light.yaml index 0783f334..c68300cd 100644 --- a/.github/oxid-esales/defaults/defaults_light.yaml +++ b/.github/oxid-esales/defaults/defaults_light.yaml @@ -270,6 +270,7 @@ install_shop_with_modules: output: files: | docker-compose.yml + docker*.log source/composer.json* source/composer.lock source/source/config.inc.php diff --git a/.github/oxid-esales/defaults/defaults_light.yml b/.github/oxid-esales/defaults/defaults_light.yml index 0783f334..c68300cd 100644 --- a/.github/oxid-esales/defaults/defaults_light.yml +++ b/.github/oxid-esales/defaults/defaults_light.yml @@ -270,6 +270,7 @@ install_shop_with_modules: output: files: | docker-compose.yml + docker*.log source/composer.json* source/composer.lock source/source/config.inc.php diff --git a/.github/oxid-esales/defaults/ee.yaml b/.github/oxid-esales/defaults/ee.yaml index d68738c0..1ba5a132 100644 --- a/.github/oxid-esales/defaults/ee.yaml +++ b/.github/oxid-esales/defaults/ee.yaml @@ -17,7 +17,7 @@ global: enterprise_ref: '{{ .Github.RefName }}' # See docs/actions/prepare_shop.md for more information. -prepare_shop: +install: &install composer: transform: | { @@ -68,6 +68,9 @@ prepare_shop: # Needs to be here as $shop_type is different prefix: 'preparedShop-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + # See docs/actions/start_shop.md and docs/actions/install_shop.md for more information. install_shop: git: *git @@ -75,12 +78,15 @@ install_shop: cache: prefix: &install_shop_prefix 'shopInstallation-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' +install_shop_with_modules: *install + install_module: cache: # Need to set this as we don't install a module. When installing a module: # 'moduleInstallation-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' prefix: *install_shop_prefix load_shop: *install_shop_prefix +# END Deprecated phpunit: load_shop: *install_shop_prefix diff --git a/.github/oxid-esales/defaults/ee.yml b/.github/oxid-esales/defaults/ee.yml index d68738c0..1ba5a132 100644 --- a/.github/oxid-esales/defaults/ee.yml +++ b/.github/oxid-esales/defaults/ee.yml @@ -17,7 +17,7 @@ global: enterprise_ref: '{{ .Github.RefName }}' # See docs/actions/prepare_shop.md for more information. -prepare_shop: +install: &install composer: transform: | { @@ -68,6 +68,9 @@ prepare_shop: # Needs to be here as $shop_type is different prefix: 'preparedShop-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + # See docs/actions/start_shop.md and docs/actions/install_shop.md for more information. install_shop: git: *git @@ -75,12 +78,15 @@ install_shop: cache: prefix: &install_shop_prefix 'shopInstallation-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' +install_shop_with_modules: *install + install_module: cache: # Need to set this as we don't install a module. When installing a module: # 'moduleInstallation-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' prefix: *install_shop_prefix load_shop: *install_shop_prefix +# END Deprecated phpunit: load_shop: *install_shop_prefix diff --git a/.github/oxid-esales/defaults/pe.yaml b/.github/oxid-esales/defaults/pe.yaml index 8f4a1314..c1d133fe 100644 --- a/.github/oxid-esales/defaults/pe.yaml +++ b/.github/oxid-esales/defaults/pe.yaml @@ -17,7 +17,7 @@ global: enterprise_ref: '{{ .Github.RefName }}' # See docs/actions/prepare_shop.md for more information. -prepare_shop: +install: &install composer: transform: | { @@ -58,6 +58,9 @@ prepare_shop: # Needs to be here as $shop_type is different prefix: 'preparedShop-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + # See docs/actions/start_shop.md and docs/actions/install_shop.md for more information. install_shop: git: *git @@ -65,12 +68,15 @@ install_shop: cache: prefix: &install_shop_prefix 'shopInstallation-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' +install_shop_with_modules: *install + install_module: cache: # Need to set this as we don't install a module. When installing a module: # 'moduleInstallation-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' prefix: *install_shop_prefix load_shop: *install_shop_prefix +# END Deprecated phpunit: load_shop: *install_shop_prefix diff --git a/.github/oxid-esales/defaults/pe.yml b/.github/oxid-esales/defaults/pe.yml index 8f4a1314..c1d133fe 100644 --- a/.github/oxid-esales/defaults/pe.yml +++ b/.github/oxid-esales/defaults/pe.yml @@ -17,7 +17,7 @@ global: enterprise_ref: '{{ .Github.RefName }}' # See docs/actions/prepare_shop.md for more information. -prepare_shop: +install: &install composer: transform: | { @@ -58,6 +58,9 @@ prepare_shop: # Needs to be here as $shop_type is different prefix: 'preparedShop-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' +# BEGIN Deprecated, will be superseded by install: +prepare_shop: *install + # See docs/actions/start_shop.md and docs/actions/install_shop.md for more information. install_shop: git: *git @@ -65,12 +68,15 @@ install_shop: cache: prefix: &install_shop_prefix 'shopInstallation-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' +install_shop_with_modules: *install + install_module: cache: # Need to set this as we don't install a module. When installing a module: # 'moduleInstallation-{{ $shop_type }}-{{ .Github.SHA }}-{{ .Github.RunID }}' prefix: *install_shop_prefix load_shop: *install_shop_prefix +# END Deprecated phpunit: load_shop: *install_shop_prefix diff --git a/.github/oxid-esales/defaults/scheduled.yaml b/.github/oxid-esales/defaults/scheduled.yaml index f0dad11d..75559c18 100644 --- a/.github/oxid-esales/defaults/scheduled.yaml +++ b/.github/oxid-esales/defaults/scheduled.yaml @@ -5,10 +5,13 @@ global: title: '{{ .Github.EventName }}-{{ .Data.global.git.default_ref }}' -prepare_shop: +install: &install git: shop_ref: '{{ .Data.global.git.default_ref }}' +prepare_shop: *install +install_shop_with_modules: *install + sonarcloud: target_branch: '{{ .Data.global.git.default_ref }}' diff --git a/.github/oxid-esales/defaults/scheduled.yml b/.github/oxid-esales/defaults/scheduled.yml index f0dad11d..75559c18 100644 --- a/.github/oxid-esales/defaults/scheduled.yml +++ b/.github/oxid-esales/defaults/scheduled.yml @@ -5,10 +5,13 @@ global: title: '{{ .Github.EventName }}-{{ .Data.global.git.default_ref }}' -prepare_shop: +install: &install git: shop_ref: '{{ .Data.global.git.default_ref }}' +prepare_shop: *install +install_shop_with_modules: *install + sonarcloud: target_branch: '{{ .Data.global.git.default_ref }}' diff --git a/.github/workflows/universal_workflow_light.yaml b/.github/workflows/universal_workflow_light.yaml index 6d807709..40ab788f 100644 --- a/.github/workflows/universal_workflow_light.yaml +++ b/.github/workflows/universal_workflow_light.yaml @@ -551,18 +551,6 @@ jobs: config_idebug: ${{ steps.iltp.outputs.install_config_idebug }} debug: ${{ needs.init.outputs.debug }} - - name: 'Install shop (script)' - if: ${{ steps.iltp.outputs.install_method == 'script' && steps.iltp.outputs.install_skip_shop_installation == 'false' }} - run: | - SCRIPT="${{ steps.iltp.outputs.install_script }}" - if [ -f "${SCRIPT}" ]; then - chmod a+x "${SCRIPT}" - "${SCRIPT}" - else - echo -e "\033[0;31mCould not finds ${SCRIPT}\033[0m" - exit 1 - fi - - name: 'Debug Install shop (script)' if: ${{ steps.iltp.outputs.install_method == 'script' && steps.iltp.outputs.install_skip_shop_installation == 'false' }} run: | @@ -584,11 +572,32 @@ jobs: echo -e "\033[0;31mCould not find ${SCRIPT}\033[0m" exit 1 fi + 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 EOF + - name: 'Install shop (script)' + if: ${{ steps.iltp.outputs.install_method == 'script' && steps.iltp.outputs.install_skip_shop_installation == 'false' }} + run: | + SCRIPT="${{ steps.iltp.outputs.install_script }}" + if [ -f "${SCRIPT}" ]; then + chmod a+x "${SCRIPT}" + "${SCRIPT}" + else + echo -e "\033[0;31mCould not finds ${SCRIPT}\033[0m" + exit 1 + fi + 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 + - name: Activate modules shell: bash run: | + # Activate modules ${{ needs.init.outputs.debug }} if [ -f 'source/bin/oe-console' ]; then OE_CONSOLE='bin/oe-console' @@ -628,6 +637,7 @@ jobs: with: name: '${{ steps.iltp.outputs.install_output_artifact_prefix }}-${{steps.itn.outputs.matrix_suffix}}' path: |- + docker*.log files.txt generated_testplan.yaml load_testplan_install.log diff --git a/.github/workflows/universal_workflow_light.yml b/.github/workflows/universal_workflow_light.yml index 6d807709..40ab788f 100644 --- a/.github/workflows/universal_workflow_light.yml +++ b/.github/workflows/universal_workflow_light.yml @@ -551,18 +551,6 @@ jobs: config_idebug: ${{ steps.iltp.outputs.install_config_idebug }} debug: ${{ needs.init.outputs.debug }} - - name: 'Install shop (script)' - if: ${{ steps.iltp.outputs.install_method == 'script' && steps.iltp.outputs.install_skip_shop_installation == 'false' }} - run: | - SCRIPT="${{ steps.iltp.outputs.install_script }}" - if [ -f "${SCRIPT}" ]; then - chmod a+x "${SCRIPT}" - "${SCRIPT}" - else - echo -e "\033[0;31mCould not finds ${SCRIPT}\033[0m" - exit 1 - fi - - name: 'Debug Install shop (script)' if: ${{ steps.iltp.outputs.install_method == 'script' && steps.iltp.outputs.install_skip_shop_installation == 'false' }} run: | @@ -584,11 +572,32 @@ jobs: echo -e "\033[0;31mCould not find ${SCRIPT}\033[0m" exit 1 fi + 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 EOF + - name: 'Install shop (script)' + if: ${{ steps.iltp.outputs.install_method == 'script' && steps.iltp.outputs.install_skip_shop_installation == 'false' }} + run: | + SCRIPT="${{ steps.iltp.outputs.install_script }}" + if [ -f "${SCRIPT}" ]; then + chmod a+x "${SCRIPT}" + "${SCRIPT}" + else + echo -e "\033[0;31mCould not finds ${SCRIPT}\033[0m" + exit 1 + fi + 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 + - name: Activate modules shell: bash run: | + # Activate modules ${{ needs.init.outputs.debug }} if [ -f 'source/bin/oe-console' ]; then OE_CONSOLE='bin/oe-console' @@ -628,6 +637,7 @@ jobs: with: name: '${{ steps.iltp.outputs.install_output_artifact_prefix }}-${{steps.itn.outputs.matrix_suffix}}' path: |- + docker*.log files.txt generated_testplan.yaml load_testplan_install.log diff --git a/prepare_shop/action.yaml b/prepare_shop/action.yaml index 78cfadd6..8a6b4bae 100644 --- a/prepare_shop/action.yaml +++ b/prepare_shop/action.yaml @@ -264,6 +264,7 @@ runs: echo "::warning file=${{ github.workflow_ref}},title=Deprecation warning::git_shop_url is deprecated, switch to git_repository" REF='${{ inputs.git_shop_ref }}' fi + echo -e "\033[0;35m### Cloning ${REF} ###\033[0m" git clone --depth 2 "${URL}" --branch "${REF}" --single-branch source - name: Clone the shop (PR ${{ inputs.github_event_number }}) @@ -289,6 +290,7 @@ runs: URL="https://oxidci:${{ inputs.enterprise_github_token }}@github.com/${REPO}" fi fi + echo -e "\033[0;35m### Cloning ${{ inputs.github_base_ref }} and merging head:pr_${{ inputs.github_event_number }} ###\033[0m" git clone --depth 2 "${URL}" --branch ${{ inputs.github_base_ref }} --single-branch source git -C source fetch origin refs/pull/${{ inputs.github_event_number }}/head:pr_${{ inputs.github_event_number }} git -C source checkout pr_${{ inputs.github_event_number }} @@ -303,6 +305,7 @@ runs: AUTH="oxidci:${{ inputs.enterprise_github_token || github.token }}" echo -e "\033[0;35mHandling the pull request for the EE shop\033[0m" mkdir -p source/dev-packages + echo -e "\033[0;35m### Cloning ${{ inputs.github_base_ref }} and merging head:pr_${{ inputs.github_event_number }} ###\033[0m" git clone --depth 2 \ https://${AUTH}@github.com/OXID-eSales/oxideshop_ee.git \ --branch ${{ inputs.github_base_ref }} \ @@ -388,7 +391,6 @@ runs: shell: bash run: | # prepare_shop: Output docker logs if make up failed - echo -e "\033[0;31m### Starting docker failed\033[0m" echo -e "\033[0;35m### docker-compose.yml ###\033[0m" cat docker-compose.yml echo -e "\033[0;35m### docker compose logs ###\033[0m" diff --git a/run_test_script/action.yaml b/run_test_script/action.yaml index e52abb49..17f4e3e1 100644 --- a/run_test_script/action.yaml +++ b/run_test_script/action.yaml @@ -103,6 +103,11 @@ runs: cp data/php/logs/error_log.txt source/${{ inputs.path }}/tests/Output/ cp data/mysql/mysql/slow_log* source/${{ inputs.path }}/tests/Output/ cp data/mysql/mysql/general_log* source/${{ inputs.path }}/tests/Output/ + docker compose logs --tail=all >source/${{ inputs.path }}/tests/Output/docker-compose.log + for c in $(docker ps -aq); do + echo -e "\033[0;35m### Logs for $c ###\033[0m" + docker logs -n 2000 $c >source/${{ inputs.path }}/tests/Output/docker-$c.log + done - name: Upload artifact if: always() diff --git a/stop_shop/action.yaml b/stop_shop/action.yaml index 5bbe9f0b..e526b47a 100644 --- a/stop_shop/action.yaml +++ b/stop_shop/action.yaml @@ -10,6 +10,17 @@ inputs: runs: using: "composite" steps: + - name: Output docker logs + if: always() + shell: bash + run: | + # stop_shop: Output docker logs if make up failed + docker compose logs --tail=all >>docker-compose.log + for c in $(docker ps -aq); do + echo -e "\033[0;35m### Logs for $c ###\033[0m" + docker logs -n 2000 $c >docker-$c.log + done + - name: Stop containers if: always() shell: bash