Make WordPress Core


Ignore:
Timestamp:
07/01/2024 07:17:07 PM (5 months ago)
Author:
desrosj
Message:

Build/Test Tools: Make use of new reusable workflows for 5.4.

This updates the 5.4 branch to utilize the new reusable workflows in trunk introduced in [58165].

This also includes backports for a some additional improvements and bug fixes that are necessary for the local development environment to continue working long term:

  • The image and platform properties for the mysql container have been updated to always prefer amd64 containers (#60822).
  • macos-13 is now pinned for MacOS jobs instead of macos-latest (#61340).
  • Migrating to Docker Compose V2 (#60901).
  • Removing the version property from docker-compose.yml (#59416).
  • Improvements to how artifacts and comments for Playground testing are generated.
  • Removing SVN related commands causing failures (#61216).
  • Updating the actions/github-scripts action to the latest version.
  • Cache the results of PHP_CodeSniffer runs (#49783).
  • Move the Memcached container into the Docker Compose config (#55700).
  • Improvements to the healthcheck command for the mysql container (#58867).
  • Skip some tests when not in the primary branch (#50401).

Merges [49264], [51673], [52179], [53552], [53895], [56464], [57918], [58157], [57124], [57125], [57249] to the 5.4 branch.

Props johnbillion, joemcgill, swissspidy, thelovekesh, narenin, mukesh27, JeffPaul, peterwilsoncc, zieladam, ockham, SergeyBiryukov, jorbin, Clorith, afragen, jrf.
See #49783, #58867, #61340, #60822, #61216, #60901, #61101, #59416, #59805, #61213.

Location:
branches/5.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4

  • branches/5.4/docker-compose.yml

    r55521 r58611  
    1 version: '3.7'
    2 
    31services:
    42
     
    2220      - ./:/var/www
    2321
    24     # Load our config file, substituning environment variables into the config.
     22    # Load our config file, substituting environment variables into the config.
    2523    command: /bin/sh -c "envsubst '$$LOCAL_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
    2624
    2725    depends_on:
    28       - php
     26      php:
     27        condition: service_started
     28      mysql:
     29        condition: service_healthy
    2930
    3031  ##
     
    3839
    3940    environment:
    40       LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
    41       LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
    42       PHP_FPM_UID: ${PHP_FPM_UID-1000}
    43       PHP_FPM_GID: ${PHP_FPM_GID-1000}
     41      - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false}
     42      - XDEBUG_MODE=${LOCAL_PHP_XDEBUG_MODE-develop,debug}
     43      - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false}
     44      - PHP_FPM_UID=${PHP_FPM_UID-1000}
     45      - PHP_FPM_GID=${PHP_FPM_GID-1000}
     46      - GITHUB_REF=${GITHUB_REF-false}
     47      - GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME-false}
    4448
    4549    volumes:
     
    4751      - ./:/var/www
    4852
    49     depends_on:
    50       - mysql
     53    # Copy or delete the Memcached dropin plugin file as appropriate.
     54    command: /bin/sh -c "if [ $LOCAL_PHP_MEMCACHED = true ]; then cp -n /var/www/tests/phpunit/includes/object-cache.php /var/www/src/wp-content/object-cache.php; else rm -f /var/www/src/wp-content/object-cache.php; fi && exec php-fpm"
     55
     56    # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
     57    init: true
     58
     59    extra_hosts:
     60      - localhost:host-gateway
    5161
    5262  ##
     
    5464  ##
    5565  mysql:
    56     image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
     66    image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
     67    platform: linux/amd64
    5768
    5869    networks:
     
    7283    command: --default-authentication-plugin=mysql_native_password
    7384
     85    healthcheck:
     86      test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then mariadb-admin ping -h localhost; else mysqladmin ping -h localhost; fi" ]
     87      timeout: 5s
     88      interval: 5s
     89      retries: 10
     90
    7491  ##
    7592  # The WP CLI container.
     
    8299
    83100    environment:
    84       LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
    85       LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
    86       PHP_FPM_UID: ${PHP_FPM_UID-1000}
    87       PHP_FPM_GID: ${PHP_FPM_GID-1000}
     101      - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false}
     102      - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false}
     103      - PHP_FPM_UID=${PHP_FPM_UID-1000}
     104      - PHP_FPM_GID=${PHP_FPM_GID-1000}
    88105
    89106    volumes:
     
    92109    # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
    93110    init: true
     111
     112    extra_hosts:
     113      - localhost:host-gateway
     114
     115    depends_on:
     116      php:
     117        condition: service_started
     118      mysql:
     119        condition: service_healthy
    94120
    95121  ##
     
    103129
    104130    environment:
    105       LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
    106       LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
    107       LOCAL_DIR: ${LOCAL_DIR-src}
    108       WP_MULTISITE: ${WP_MULTISITE-false}
    109       PHP_FPM_UID: ${PHP_FPM_UID-1000}
    110       PHP_FPM_GID: ${PHP_FPM_GID-1000}
    111       TRAVIS_BRANCH: ${TRAVIS_BRANCH-false}
    112       TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST-false}
     131      - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false}
     132      - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false}
     133      - PHP_FPM_UID=${PHP_FPM_UID-1000}
     134      - PHP_FPM_GID=${PHP_FPM_GID-1000}
     135      - LOCAL_DIR=${LOCAL_DIR-src}
     136      - WP_MULTISITE=${WP_MULTISITE-false}
     137      - GITHUB_REF=${GITHUB_REF-false}
     138      - GITHUB_EVENT_NAME=${GITHUB_EVENT_NAME-false}
    113139
    114140    volumes:
     
    121147
    122148    depends_on:
    123       - mysql
     149      php:
     150        condition: service_started
     151      mysql:
     152        condition: service_healthy
     153
     154  ##
     155  # The Memcached container.
     156  ##
     157  memcached:
     158    image: memcached
     159
     160    networks:
     161      - wpdevnet
     162
     163    ports:
     164      - 11211:11211
     165
     166    depends_on:
     167      php:
     168        condition: service_started
    124169
    125170volumes:
Note: See TracChangeset for help on using the changeset viewer.