The IPA_SOURCE_DIR variable is used to set the location of the ironic-python-agent source code that will be installed in the ironic-python-agent tinycore-based image (tinyipa).
It defaults to /opt/stack/ironic-python-agent but you can use any other dir as far as you set the correct path in the environment variable.
You need to have that populated before trying to build the image.
FYI tinyipa is a test-oriented image thought specifically to be used in CI, and should not be used in production environments.
If you need an image suited for production on real hardware, I suggest to build one based on diskimage-builder
https://docs.openstack.org/ironic-python-agent-builder/latest/admin/dib.html