Skip to content

cqfd: allow to use a symlinked Dockerfile#260

Merged
florentsfl merged 2 commits intomasterfrom
fallard/allow-dockerfile-symlink
Apr 20, 2026
Merged

cqfd: allow to use a symlinked Dockerfile#260
florentsfl merged 2 commits intomasterfrom
fallard/allow-dockerfile-symlink

Conversation

@florentsfl
Copy link
Copy Markdown
Contributor

This commit makes it possible for .cqfd/docker/Dockerfile to be a symlink. This allows projects which already have a Dockerfile stored somewhere to make a symlink to it for cqfd.

@florentsfl florentsfl force-pushed the fallard/allow-dockerfile-symlink branch from 1d46018 to e1b27be Compare February 4, 2026 18:07
@florentsfl florentsfl force-pushed the fallard/allow-dockerfile-symlink branch from 7f83e52 to 8987cd3 Compare February 17, 2026 19:05
@florentsfl florentsfl force-pushed the fallard/allow-dockerfile-symlink branch 4 times, most recently from 336f1b8 to 4e51e5b Compare March 24, 2026 19:55
#!/usr/bin/env bats

setup_file() {
mv .cqfd/docker/Dockerfile .cqfd/docker/Dockerfile.real
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporarily destructive to the workdir, so if this test session is interrupted before the teardown is called, we are left with a broken test suite.
I suggest to instead use the cqfd -d option. It will allow you to build the symlinked Dockerfile without touching the original.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, I updated the test, and it allowed me to fix another bug where symlinks were not working when using -d. Thanks !

This commit also makes the build command more robust by always
specifying the absolute path to the Dockerfile, which helps when the
symlinked Dockerfile is not named as the default `Dockerfile`
The variable CQFD_DEBUG was not cleared in the Makefile so the local
environment could disrupt the correct behavior of the tests when using
`make tests`
@florentsfl florentsfl force-pushed the fallard/allow-dockerfile-symlink branch from 4e51e5b to e0fff81 Compare April 14, 2026 14:25
@florentsfl florentsfl requested a review from deribaucourt April 14, 2026 14:29
@florentsfl florentsfl merged commit a2a2af7 into master Apr 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants