limited-balloon-79828
09/25/2023, 10:12 AMsrc.python.hello_world
and not dist/src.python.hello_world
?
If my understanding is correct, pants package will generate pex file to dist
directory.
Thank you.gorgeous-winter-99296
09/25/2023, 10:15 AMdist
is only used when you package to "leave" Pants. For the most part, the path in the sandbox is the same as it is inside dist
though.limited-balloon-79828
09/25/2023, 10:19 AM- name: Build package
run: |
pants --changed-since="${{ env.REFERENCE_COMMIT }}" --changed-dependents=transitive package
- name: Build and push image
uses: docker/build-push-action@v4
with:
file: ${{ inputs.dockerfile }}
and the entry point to my code is in src/python/hello_world
, should I use the same content as the dockerfile in that pants' example repository above?
i.e. use
COPY src.python.hello_world/main.pex /bin
and not
COPY dist/src.python.hello_world/main.pex /bin
gorgeous-winter-99296
09/25/2023, 10:21 AMdist
. Just remember that the pex file may not exist since you're applying filtering.limited-balloon-79828
09/25/2023, 10:23 AMdist
. The build and push process is something handled by another team so I cannot really use pants to do it.
Thank you very much for the answer!