Skip to content

Commit 3f42ce1

Browse files
authored
ci: Retry WP core downloads in test-plugin-update (#45830)
1 parent 1f5ba6e commit 3f42ce1

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/files/test-plugin-update/setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -eo pipefail
44

5-
echo "::group::Setup database"
5+
echo "::group::Set up database"
66
cat <<EOF > ~/.my.cnf
77
[client]
88
host=${MYSQL_HOST%:*}
@@ -16,7 +16,7 @@ mysql -e "drop database if exists wordpress;"
1616
mysql -e "create database wordpress;"
1717
echo "::endgroup::"
1818

19-
echo "::group::Setup WordPress"
19+
echo "::group::Set up WordPress"
2020
mkdir -p /var/log/php/ /var/scripts/
2121
cd /var/www/html
2222
sed -i 's/apachectl -D FOREGROUND/apachectl start/' /usr/local/bin/run

tools/docker/bin/run.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ user="${APACHE_RUN_USER:-www-data}"
1313
group="${APACHE_RUN_GROUP:-www-data}"
1414

1515
# Download WordPress
16-
[ -f /var/www/html/xmlrpc.php ] || wp core download
16+
# Sometimes it fails, and a retry would be nice:
17+
# https://github.com/wp-cli/core-command/pull/258
18+
# https://github.com/wp-cli/wp-cli/pull/6140
19+
# For now this should work well enough
20+
[ -f /var/www/html/xmlrpc.php ] || wp core download || sleep $(( 30 + RANDOM % 8 )) && wp core download
1721

1822
# Configure WordPress
1923
if [ ! -f /var/www/html/wp-config.php ]; then

0 commit comments

Comments
 (0)