Installation of Xcode on jenkins node

I am running a Jenkins pipeline job for UI automation tests of an existing MacOS app using Selenium and Appium (specifically Appium Mac2 driver). The requirements for Mac2 driver require the XCode app and not just XCode command line tools, and I am getting this error when running xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Should I be installing XCode.app through my existing JenkinsFile (and what kind of command should I run for that?) , or are there other ways to install the XCode app?
The Jenkins node is currently running remotely on the company’s ECS, using Jenkins “Launch agent by connecting it to a controller”.

Appreciate any advice as I am new to building Jenkins jobs.

Hello @lxnm1, and welcome to this community. :wave:

Installing Xcode on a remote machine through a Jenkins pipeline can be quite complex and might not be the best approach. Xcode is a large piece of software and it’s not designed to be installed in a headless manner (i.e., without a GUI).