Just add another container to agent definition like that:
- name: build-container
image: image1
...
- name: test-container
image: image2
...
and connect to it via localhost.
If it does not answer your question, could you give me more information about your configuration and requirements?