-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #808 from PrestaShop/dev
Prepare release of autoupgrade v6.0.0
- Loading branch information
Showing
257 changed files
with
91,855 additions
and
11,029 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -32,13 +32,21 @@ runs: | |
env: | ||
VERSION: ${{ matrix.from }} | ||
BASE_VERSION: ${{ steps.get_base_version.outputs.BASE_VERSION }} | ||
PS_INSTALL_AUTO: 0 | ||
shell: bash | ||
run: | | ||
docker compose up -d | ||
bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost:8001/index.php)" != "200" ]]; do sleep 5; done' | ||
${{ github.action_path }}check_url.sh http://localhost:8001/index.php 200 | ||
docker compose run -u www-data:www-data --rm reference-release php -d memory_limit=-1 /var/www/html/install-dev/index_cli.php \ | ||
--domain=localhost:8001 --db_server=mysql:3306 --db_name=psreference --db_user=root \ | ||
--db_password=root --prefix=ps_ --firstname="John" --lastname="Doe" \ | ||
--password=prestashop_demo [email protected] --language=en --country=fr \ | ||
--all_languages=0 --newsletter=0 --send_email=0 --ssl=0 | ||
- name: Copy autoupgrade module | ||
shell: bash | ||
run: docker exec -u www-data prestashop_autoupgrade cp modules/autoupgrade/ -R admin-dev | ||
|
||
- name: Upgrade (intermediate) | ||
env: | ||
CHANNEL: 'archive' | ||
|
@@ -53,7 +61,8 @@ runs: | |
[[ "$SKIP" == true ]] || docker stop prestashop_autoupgrade | ||
[[ "$SKIP" == true ]] || docker rm prestashop_autoupgrade | ||
[[ "$SKIP" == true ]] || docker run --name prestashop_autoupgrade -p 8001:80 -v autoupgrade_temp-ps:/var/www/html -v "$(pwd):/var/www/html/modules/autoupgrade" --network autoupgrade_default -d prestashop/base:7.2-apache | ||
[[ "$SKIP" == true ]] || bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost:8001/index.php)" == "000" ]]; do sleep 5; done' | ||
[[ "$SKIP" == true ]] || ${{ github.action_path }}check_url.sh http://localhost:8001/index.php 200 | ||
- name: Upgrade | ||
env: | ||
CHANNEL: ${{ matrix.ps-versions.channel }} | ||
|
@@ -63,16 +72,20 @@ runs: | |
FROM: ${{ matrix.from }} | ||
shell: bash | ||
run: ${{ github.action_path }}action_upgrade.sh | ||
|
||
- name: Check endpoints response | ||
shell: bash | ||
run: | | ||
bash -c '[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost:8001/index.php)" == "200" ]' | ||
bash -c '[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost:8001/admin-dev/index.php)" == "200" ]' | ||
- name: Rollback | ||
shell: bash | ||
run: docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/tests/testCliProcess.php \ | ||
admin-dev/autoupgrade/cli-rollback.php --dir="admin-dev" \ | ||
--backup=`docker exec prestashop_autoupgrade bash -c "ls -td -- /var/www/html/admin-dev/autoupgrade/backup/*/ | head -n 1 | cut -d'/' -f8 | tr -d '\n'"`; | ||
run: | | ||
backupName=$(docker exec prestashop_autoupgrade bash -c "ls -td -- /var/www/html/admin-dev/autoupgrade/backup/*/ | head -n 1 | cut -d'/' -f8 | tr -d '\n'") | ||
docker exec -u www-data prestashop_autoupgrade php admin-dev/autoupgrade/cli-rollback.php --dir="admin-dev" \ | ||
--backup=$backupName; | ||
- name: Check endpoints response | ||
shell: bash | ||
run: | | ||
|
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
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,18 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$1" ]; then | ||
echo "Usage: $0 <url> [expected_http_code]" | ||
exit 1 | ||
fi | ||
|
||
URL=$1 | ||
HTTP_CODE=${2:-200} | ||
start_time=$(date +%s) | ||
|
||
while [[ "$(curl -L -s -o /dev/null -w %{http_code} "$URL")" != "$HTTP_CODE" ]]; do | ||
if [[ $(($(date +%s) - start_time)) -ge 300 ]]; then | ||
echo "Timeout reached" | ||
exit 1 | ||
fi | ||
sleep 5 | ||
done |
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,9 @@ | ||
{ | ||
"id_product" : "5496", | ||
"technical_name" : "autoupgrade", | ||
"display_name" : "1-Click Upgrade - AutoUpgrade", | ||
"channel" : "stable", | ||
"type_upgrade" : "minor", | ||
"product_type" : "module", | ||
"compatible_from": "1.7.0.0" | ||
} |
Oops, something went wrong.