curved-microphone-39455
02/09/2023, 6:30 PMfiles
dependencies, I use a generic kind of import all for my Docker Image
files(
name="files",
sources=[
"project/**/*",
"**/*.py",
"poetry.lock",
"pyproject.toml",
"README.md",
"!tests/",
],
)
docker_image(
name="docker",
dependencies=[
":files",
[...]
without this, I am missing several files of all kinds during the Packaging of my Docker image, but when I remove this dependency, the tailor ::
command works again correctly. Is there a way to disable for certain targets dependencies ? I have tested almost all options on the tailor stuff and options in my pants.toml
I guess this is not ideal to do an import all with files but need a generic solution to build my docker image over ~20 micro services in a mono repo + multiples libraries. Any ideas?enough-analyst-54434
02/09/2023, 6:37 PMenough-analyst-54434
02/09/2023, 6:37 PMenough-analyst-54434
02/09/2023, 6:38 PMcurved-microphone-39455
02/09/2023, 6:41 PMignore_paths = ["src/services/project/BUILD"]
• Adding in pants.toml under [tailor] ignore_adding_targets = ["src/services/project:docker", "src/services/project:files"]
(tried all combinations
• Tried to tag my files
and run tailor --tag="sommething" tailor ::
• Tried to add a negative dep in the python_source
top level of my projectenough-analyst-54434
02/09/2023, 6:42 PMsrc/services/project/BUILD
anyway?curved-microphone-39455
02/09/2023, 6:44 PMsrc/services/project/package/api
with __init__.py
and tailor won't detect it and add new BUILD files in each packagecurved-microphone-39455
02/09/2023, 6:44 PMfiles
dep completely of the top level BUILD of src/services/project
it works normallyenough-analyst-54434
02/09/2023, 6:45 PMcurved-microphone-39455
02/09/2023, 6:46 PMpython_sources()
but if they forget to add it, the unit test are failing since tailor add correctly the BUILD files for the unit tests only (I guess because I have !tests/
in my files
dependencies)curved-microphone-39455
02/09/2023, 6:47 PMcurved-microphone-39455
02/09/2023, 6:48 PMenough-analyst-54434
02/09/2023, 6:50 PMcurved-microphone-39455
02/09/2023, 7:17 PMcurved-microphone-39455
02/09/2023, 7:42 PM