Welcome to the Buildkite Forum Hope you’re well, thanks for the message!
For each step in a Buildkite pipeline - you’d need to set the command key - and in particular for those 3 commands, you could potentially do something like this:
steps:
- label: ":ant: Install ant"`
commands: |
apt-get update
apt-get -y install ant
ant clean test
Note you’ll need to set agent targeting to these steps, otherwise they’ll get targeted to agents on the default queue.
Thanks for that - the change does help, however it still isn’t recognising apt-get in the default buildkite agent:
$ trap 'kill -- $$' INT TERM QUIT; apt-get update
apt-get -y install ant
ant clean test
/bin/bash: line 1: apt-get: command not found
🚨 Error: The command exited with status 127
user command error: exit status 127
How do i install Ant (and specific versions of java/etc) in this agent?
No worries for before! On that front - has apt been installed on the agent that you are targeting for that specific build? It might be worth running a whoami to verify which user is attempting to run those commands.
Note if this is a Elastic CI Stack instance - the user that is running these commands is the buildkite-agentuser.
Fantastic to hear - I had a feeling it was relative to Ubuntu! You might want to run that image with --tags queue=docker (for example) so the specific pipelines you are targeting to run on that Ubuntu container. Buildkite has plugins that manage running jobs inside containers through our Docker/Docker Compose plugins too - which expose all the options as parameters that might help here too
I’m assuming you mean publishing Ant based JUnit test results?