ampproject / amp-wp

Enable AMP on your WordPress site, the WordPress way.
https://wordpress.org/plugins/amp/
GNU General Public License v2.0
1.79k stars 382 forks source link

Fix local-env issue of missing `xfs` user #7813

Closed thelovekesh closed 3 months ago

thelovekesh commented 3 months ago

Summary

As it can be seen in the latest CI runs - https://github.com/ampproject/amp-wp/actions/runs/9389955987/job/25858689875, the xfs user is no longer available in the container powered by alpine Linux, and resulting in error like:

RROR: for local-env_cli_1  Cannot start service cli: unable to find user xfs: no matching entries in passwd file

This PR adds a custom Docker image which extends wordpress image and installs the wp-cli binary in the image itself.

FROM wordpress

# WP CLI
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
    && chmod +x wp-cli.phar \
    && mv wp-cli.phar /usr/local/bin/wp

CMD ["apache2-foreground"]

Checklist

github-actions[bot] commented 3 months ago

Plugin builds for 14bfb80a4e110f9153a716d5083e709784d52c34 are ready :bellhop_bell:!

Checksums
# Development build checksums
ba3a6639774a9bd33fc05adc15bb6d445af960ab5489fdecdc6400fafa99162d *amp.zip

# Production build checksums
99f8c33431992daebca7e9281c20ce0df5abf8578c0e5720518595fee5e86944 *amp.zip

[!WARNING] These builds are for testing purposes only and should not be used in production.

thelovekesh commented 3 months ago

E2E tests are running now - https://github.com/ampproject/amp-wp/actions/runs/9391104052/job/25862514993. I'll fix the failing tests in a different PR after merging dependabot PRs.

thelovekesh commented 1 month ago

E2E tests are running as expected in local env. QA Passed ✅.