This is what we ended up with and it seems to work in our Jenkins pipeline
# Run with the following command line for the 3eg
# vivado2022 -mode batch -source mta_build.tcl -tclargs mta_3eg
# or for the 5ev board use the following command
# vivado2022 -mode batch -source mta_build.tcl -tclargs mta_5ev
#
if { $argc != 1 } {
puts "This script requires one argument for the board you are building"
} else {
open_project [lindex $argv 0].xpr
make_wrapper -files [get_files [lindex $argv 0].bd] -top -import
launch_runs synth_1
wait_on_run synth_1
launch_runs impl_1 -to_step write_bitstream
wait_on_run impl_1
write_hw_platform -fixed -include_bit -force -file [lindex $argv 0].xsa
}
Now if we could only add some tests