Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Proper build target for local Docker Compose #7834

Merged
merged 7 commits into from
Feb 17, 2024

Conversation

Wirone
Copy link
Member

@Wirone Wirone commented Feb 10, 2024

Bug introduced in #7782, I probably had compose.override.yml and did not encounter this before. Now I wanted to check lower PHP versions because #7777 stopped working for <8.1 and got an error during build.

To make sure it won't happen again, I've added new CI workflow that will test Docker Compose builds when PR has Docker-related changes, on master branch push and once a day as a scheduled pipeline.

I've moved current Docker workflow to "Release" workflow, we can later add more jobs that should happen on tags (like publishing official page).

@Wirone Wirone added the topic/docker Docker distribution, development runtime label Feb 10, 2024
@Wirone Wirone self-assigned this Feb 10, 2024
@coveralls
Copy link

coveralls commented Feb 10, 2024

Coverage Status

coverage: 94.769%. remained the same
when pulling 80743f4 on Wirone:codito/fix-docker-compose-build
into 4ab8fc4 on PHP-CS-Fixer:master.

@Wirone
Copy link
Member Author

Wirone commented Feb 10, 2024

@keradus @julienfalque Actually we could use docker compose for running every other CI / SA job on each PHP version, instead of using shivammathur/setup-php. With this approach we would have exact same runtime in CI as locally for development and in real-world where official Docker images are used. But this is separate topic that we should discuss and implement only if we agree on it 😉.

@julienfalque
Copy link
Member

Yeah IMO it's better because, as you said, the runtime in dev and CI is (almost) exactly the same, even if there will always be some small differences. That's what we did at one of my previous jobs and it led to easier CI setup and much less CI specific failures.

However this requires a good caching setup for Docker images to avoid rebuilding those everytime. My experience is based on Bitbucket Pipelines, which had a caching system that could only store one cache version, so it worked well as long as the Docker setup didn't change at all, in which case the images were rebuilt on every job until the cache expired or was manually removed. I don't know how easy that would be on GitHub.

@Wirone
Copy link
Member Author

Wirone commented Feb 11, 2024

That's why I said it's something to do in a separate PR 😉. For now let's just fix local build and make sure it's always buildable.

@Wirone Wirone force-pushed the codito/fix-docker-compose-build branch from de0afa7 to 7919eaf Compare February 11, 2024 22:21
@Wirone Wirone force-pushed the codito/fix-docker-compose-build branch from 7919eaf to 3972250 Compare February 12, 2024 10:40
@Wirone Wirone enabled auto-merge (squash) February 17, 2024 16:36
@Wirone Wirone merged commit 591fb20 into PHP-CS-Fixer:master Feb 17, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/docker Docker distribution, development runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants