Make WordPress Core

Changeset 57918


Ignore:
Timestamp:
04/03/2024 11:31:43 AM (3 months ago)
Author:
swissspidy
Message:

Build/Test Tools: Migrate to Docker Compose V2.

Compose V2, which was first released in 2020, is included with all currently supported versions of Docker Desktop. Compose V1 stopped receiving updates in July 2023.

The biggest difference is that the command to interact with Compose changed from docker-compose to docker compose.

GitHub has now started removing V1 from Ubuntu & Windows images, which caused all Docker-based GitHub Actions workflows to fail.

This change migrates to the new docker compose command to address these failures.

Props swissspidy, thelovekesh.
Fixes #60901.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/end-to-end-tests.yml

    r57655 r57918  
    109109        run: |
    110110          docker -v
    111           docker-compose -v
    112           docker-compose run --rm mysql mysql --version
    113           docker-compose run --rm php php --version
    114           docker-compose run --rm php php -m
    115           docker-compose run --rm php php -i
    116           docker-compose run --rm php locale -a
     111          docker compose run --rm mysql mysql --version
     112          docker compose run --rm php php --version
     113          docker compose run --rm php php -m
     114          docker compose run --rm php php -i
     115          docker compose run --rm php locale -a
    117116
    118117      - name: Install WordPress
  • trunk/.github/workflows/performance.yml

    r57655 r57918  
    143143        run: |
    144144          docker -v
    145           docker-compose -v
    146           docker-compose run --rm mysql mysql --version
    147           docker-compose run --rm php php --version
    148           docker-compose run --rm php php -m
    149           docker-compose run --rm php php -i
    150           docker-compose run --rm php locale -a
     145          docker compose run --rm mysql mysql --version
     146          docker compose run --rm php php --version
     147          docker compose run --rm php php -m
     148          docker compose run --rm php php -i
     149          docker compose run --rm php locale -a
    151150
    152151      - name: Install WordPress
  • trunk/.github/workflows/phpunit-tests-run.yml

    r57757 r57918  
    131131        run: |
    132132          docker -v
    133           docker-compose -v
    134133
    135134      - name: Start Docker environment
     
    142141      - name: WordPress Docker container debug information
    143142        run: |
    144           docker-compose run --rm mysql ${{ env.LOCAL_DB_TYPE }} --version
    145           docker-compose run --rm php php --version
    146           docker-compose run --rm php php -m
    147           docker-compose run --rm php php -i
    148           docker-compose run --rm php locale -a
     143          docker compose run --rm mysql ${{ env.LOCAL_DB_TYPE }} --version
     144          docker compose run --rm php php --version
     145          docker compose run --rm php php -m
     146          docker compose run --rm php php -i
     147          docker compose run --rm php locale -a
    149148
    150149      - name: Install WordPress
     
    185184        env:
    186185          WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
    187         run: docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
     186        run: docker compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
  • trunk/.github/workflows/test-coverage.yml

    r57757 r57918  
    124124        run: |
    125125          docker -v
    126           docker-compose -v
    127126
    128127      - name: Start Docker environment
     
    135134      - name: WordPress Docker container debug information
    136135        run: |
    137           docker-compose run --rm mysql mysql --version
    138           docker-compose run --rm php php --version
    139           docker-compose run --rm php php -m
    140           docker-compose run --rm php php -i
    141           docker-compose run --rm php locale -a
     136          docker compose run --rm mysql mysql --version
     137          docker compose run --rm php php --version
     138          docker compose run --rm php php -m
     139          docker compose run --rm php php -i
     140          docker compose run --rm php locale -a
    142141
    143142      - name: Install WordPress
  • trunk/tools/local-env/scripts/docker.js

    r54096 r57918  
    55dotenvExpand.expand( dotenv.config() );
    66
    7 // Execute any docker-compose command passed to this script.
    8 execSync( 'docker-compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
     7// Execute any docker compose command passed to this script.
     8execSync( 'docker compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
  • trunk/tools/local-env/scripts/install.js

    r56042 r57918  
    4747 */
    4848function wp_cli( cmd ) {
    49     execSync( `docker-compose run --rm cli ${cmd}`, { stdio: 'inherit' } );
     49    execSync( `docker compose run --rm cli ${cmd}`, { stdio: 'inherit' } );
    5050}
    5151
     
    5656    const testPluginDirectory = 'tests/phpunit/data/plugins/wordpress-importer';
    5757
    58     execSync( `docker-compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } );
    59     execSync( `docker-compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } );
     58    execSync( `docker compose exec -T php rm -rf ${testPluginDirectory}`, { stdio: 'inherit' } );
     59    execSync( `docker compose exec -T php git clone https://github.com/WordPress/wordpress-importer.git ${testPluginDirectory} --depth=1`, { stdio: 'inherit' } );
    6060}
  • trunk/tools/local-env/scripts/start.js

    r55473 r57918  
    2020    ? 'wordpress-develop memcached'
    2121    : 'wordpress-develop';
    22 execSync( `docker-compose up -d ${containers}`, { stdio: 'inherit' } );
     22execSync( `docker compose up -d ${containers}`, { stdio: 'inherit' } );
    2323
    2424// If Docker Toolbox is being used, we need to manually forward LOCAL_PORT to the Docker VM.
Note: See TracChangeset for help on using the changeset viewer.