Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .github/workflows/universal_workflow_light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ on:
SLACK_WEBHOOK_URL:
required: false
# description: Webhook for posting to SLACK
EXTERNAL_GIT_HOST:
required: false
# description: external git host
EXTERNAL_GIT_USERNAME:
required: false
# description: external git username
EXTERNAL_GIT_PASSWORD:
required: false
# description: external git password

jobs:
init:
Expand Down Expand Up @@ -313,6 +322,9 @@ jobs:
git_ref: ${{ steps.iltp.outputs.install_git_ref }}
compilation_url: ${{ steps.iltp.outputs.install_composer_root_url }}
github_ref_name: ${{ github.ref_name }}
external_git_host: ${{ secrets.EXTERNAL_GIT_HOST }}
external_git_username: ${{ secrets.EXTERNAL_GIT_USERNAME }}
external_git_password: ${{ secrets.EXTERNAL_GIT_PASSWORD }}
php: ${{ matrix.php }}
mysql: ${{ matrix.mysql }}
custom_ini_error_reporting: ${{ steps.iltp.outputs.install_custom_ini_error_reporting }}
Expand Down Expand Up @@ -827,12 +839,20 @@ jobs:
# Only run this if there is no transformation and composer_early is set to 'false'
if: ${{ steps.rt.outputs.runscript_composer_transform == '' && steps.rt.outputs.runscript_composer_early == 'false' }}
run: |
# run composer
# set oauth
${{ inputs.debug }}
docker compose exec -T \
${{ steps.rt.outputs.runscript_container_options }} \
${{ steps.rt.outputs.runscript_container_name }} \
composer config -g github-oauth.github.com "${{ secrets.enterprise_github_token || github.token }}"
# set http-basic
if [ -n "${{ secrets.EXTERNAL_GIT_HOST }}" ]; then
docker compose exec -T \
${{ steps.rt.outputs.runscript_container_options }} \
${{ steps.rt.outputs.runscript_container_name }} \
composer config -g http-basic.${{ secrets.EXTERNAL_GIT_HOST }} "${{ secrets.EXTERNAL_GIT_USERNAME }}" "${{ secrets.EXTERNAL_GIT_PASSWORD }}"
fi
#run composer
docker compose exec -T \
${{ steps.rt.outputs.runscript_container_options }} \
${{ steps.rt.outputs.runscript_container_name }} \
Expand Down Expand Up @@ -1032,6 +1052,13 @@ jobs:
${{ steps.rt.outputs.runslim_container_options }} \
${{ steps.rt.outputs.runslim_container_name }} \
composer config -g github-oauth.github.com "${{ secrets.enterprise_github_token || github.token }}"
# set http-basic
if [ -n "${{ secrets.EXTERNAL_GIT_HOST }}" ]; then
docker compose exec -T \
${{ steps.rt.outputs.runslim_container_options }} \
${{ steps.rt.outputs.runslim_container_name }} \
composer config -g http-basic.${{ secrets.EXTERNAL_GIT_HOST }} "${{ secrets.EXTERNAL_GIT_USERNAME }}" "${{ secrets.EXTERNAL_GIT_PASSWORD }}"
fi
docker compose exec -T \
${{ steps.rt.outputs.runslim_container_options }} \
${{ steps.rt.outputs.runslim_container_name }} \
Expand Down
13 changes: 13 additions & 0 deletions docs/actions/prepare_shop.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,19 @@ Populate with \${{ secrets.DOCKER_HUB_USER }}, GitHub will hide its content.
Needed for docker login.
Populate with \${{ secrets.DOCKER_HUB_TOKEN }}, GitHub will hide its content.

**external_git_host:** *not required*, *default:* `''`
Hostname of an external private git server requiring HTTP basic authentication (e.g. `git.company.com`).
When set, configures composer with the provided credentials for this host before running `composer update`.
Populate with \${{ secrets.EXTERNAL_GIT_HOST }}, GitHub will hide its content.

**external_git_username:** *not required*, *default:* `''`
Username for HTTP basic authentication on the external git host.
Populate with \${{ secrets.EXTERNAL_GIT_USERNAME }}, GitHub will hide its content.

**external_git_password:** *not required*, *default:* `''`
Password or token for HTTP basic authentication on the external git host.
Populate with \${{ secrets.EXTERNAL_GIT_PASSWORD }}, GitHub will hide its content.

**copy_script_targets:** *not required*, *default:* 'tests/scripts'
Copy the test scripts to these target folders.

Expand Down
15 changes: 10 additions & 5 deletions docs/workflows/universal_workflow_light.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ debugging scripts can be run locally.
This allows for dynamic passing of YAML code containing variables. The provided multiline string
will be stored in {plan_folder}/_custom.yaml and can be used in the testplan argument as ~/_custom.yaml.

**use_scheduled_slack_channel:** *not required*, *default:* true
If this is set to true and the secret SLACK_SCHEDULED_WEBHOOK_URL is provided, the Slack notification is sent to the channel specified by SLACK_SCHEDULED_WEBHOOK_URL instead of the channel specified by SLACK_WEBHOOK_URL.

## Secrets

**DOCKER_HUB_USER:**
Expand All @@ -64,5 +61,13 @@ Token to submit sonarcloud reports to their website
**SLACK_WEBHOOK_URL:**
URL for the Slack API to send reports to.

**SLACK_WEBHOOK_URL:**
URL for the Slack API to send reports to if the input use_scheduled_slack_channel is set to true.
**EXTERNAL_GIT_HOST:**
Hostname of an external private git server requiring HTTP basic authentication. When set, composer is
configured with the provided credentials for this host during shop installation and before each composer
run in the `runscript` and `runslim` jobs (credentials are re-applied as containers start fresh from cache).

**EXTERNAL_GIT_USERNAME:**
Username for HTTP basic authentication on the external git host.

**EXTERNAL_GIT_PASSWORD:**
Password or token for HTTP basic authentication on the external git host.
26 changes: 26 additions & 0 deletions prepare_shop/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ inputs:
required: false
description: 'Current branch (github.ref_name) for modifying composer.json'
default: ''
external_git_host:
type: string
required: false
description: 'Full hostname of external private git server (e.g. git.company.com) for HTTP basic authentication'
default: ''
external_git_username:
type: string
required: false
description: 'external_git_username for 3rd party git login'
default: ''
external_git_password:
type: string
required: false
description: 'external_git_password for 3rd party git login'
default: ''
php:
type: string
required: false
Expand Down Expand Up @@ -315,6 +330,17 @@ runs:
${{ inputs.container_name}} \
composer config -g github-oauth.github.com "${{ inputs.enterprise_github_token }}"

- name: Configure external git repository
if: ${{ inputs.external_git_host != '' }}
shell: bash
run: |
# prepare_shop: Configure external git repository
${{ inputs.debug }}
docker compose ${{ inputs.container_method }} -T \
${{ inputs.container_options }} \
${{ inputs.container_name}} \
composer config -g http-basic.${{ inputs.external_git_host }} "${{ inputs.external_git_username }}" "${{ inputs.external_git_password }}"

- name: 'Set Composer version'
if: ${{ inputs.composer_version != '' }}
shell: bash
Expand Down