How to exclude software from build process #167119
-
| Why are you starting this discussion?Question What GitHub Actions topic or product is this about?Actions Runner Image Discussion DetailsWe're using the runner-images repo to create and publish an image to an internal Azure Compute Gallery, which we use in combination with Azure VMSS to create private agents for use in our test pipelines. We run the build process in a pipeline, which works very well, however, the process takes quite some time to complete, and the image includes software that we don't use (eg Android SDK). I'd like to find a reliable way to exclude some software from the image that we build which would help speed up the build process, and make it more reliable. Is there any native way of doing this in the repo as it currently stands ? eg is there a json file I could update which would cause packer to skip those particular scripts ? I presume not, but I thought I'd ask I presume the "manual" approach to doing this would be a) Delete the relevant file (eg Install-AndroidSDK.ps1) b) Remove it's reference in the .pkr.hcl file and c) Delete the corresponding .Tests.ps1 file. Would this be roughly correct ? Thanks in advance. Apologies if this post appears confusing | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
| Hi @mmcdermo2 , unfortunately, there isn't a built-in, simple config file in the runner-images repo to just toggle off specific software installations, you've actually nailed the 'manual' approach, you'd indeed need to delete the relevant installation script, remove its reference from the .pkr.hcl file, and then delete its corresponding test file. That's pretty much the standard, hands-on way to customize these images yourself, giving you full control over what goes in. | 
Beta Was this translation helpful? Give feedback.
Hi @mmcdermo2 , unfortunately, there isn't a built-in, simple config file in the runner-images repo to just toggle off specific software installations, you've actually nailed the 'manual' approach, you'd indeed need to delete the relevant installation script, remove its reference from the .pkr.hcl file, and then delete its corresponding test file. That's pretty much the standard, hands-on way to customize these images yourself, giving you full control over what goes in.