Generating a build process for building software in a target environment
A build process for building software in a target environment can be generated using a system described herein. For example, the system can receive a recommended software-stack for a target software item to be built in a target build environment. The system can determine, based on the recommended software-stack, a build process for building the target software item in the target build environment. The system may then execute the build process to generate a software build of the target software item in the target build environment.
1. A system comprising:
a processor; and
a non-transitory memory including instructions that are executable by the processor for causing the processor to:
receive, from a recommendation engine, a recommended software-stack for a target software item to be built in a target build environment, wherein the recommendation engine is configured to generate the recommended software-stack using a combinatorial optimization algorithm configured to search a search space for a local minimum or maximum of combinations of dependencies of the target software item that satisfy an objective function to determine a group of software-stack candidates, wherein each software-stack candidate in the group of software-stack candidates has a unique combination of software components in the search space, wherein the recommendation engine is further configured to select the recommended software-stack for the target software item from the group of software-stack candidates;
determine, based on the recommended software-stack, a build process for building the target software item in the target build environment; and
execute the build process to generate a software build of the target software item in the target build environment.
2. The system of claim 1 , wherein the non-transitory memory further includes instructions that are executable by the processor for causing the processor to:
deploy the software build in a target runtime environment;
determine performance metrics for the software build in the target runtime environment; and
provide feedback to the recommendation engine based on the performance metrics for the software build.
3. The system of claim 2 , wherein the recommendation engine is configured to receive the feedback and adjust a recommendation process for recommending software-stacks based on the feedback.
4. The system of claim 1 , wherein the instructions are further executable by the processor for causing the processor to:
identify, based on the recommended software-stack, specified packages for generating the software build;
determine an installation order for the specified packages; and
install the specified packages in the target build environment in the installation order.
5. The system of claim 1 , wherein the instructions are further executable by the processor for causing the processor to:
determine, based on the recommended software-stack, a hardware component to be used in executing the build process;
select a computing cluster having access to the hardware component; and
execute the build process using the computing cluster.
6. The system of claim 1 , wherein the build process is stateless, and wherein the instructions are further executable by the processor for causing the processor to execute the build process multiple times concurrently for a plurality of target software items.
7. A method comprising:
receiving, by a processor and from a recommendation engine, a recommended software-stack for a target software item to be built in a target build environment, wherein the recommendation engine is configured to generate the recommended software-stack using a combinatorial optimization algorithm configured to search a search space for a local minimum or maximum of combinations of dependencies of the target software item that satisfy an objective function to determine a group of software-stack candidates, wherein each software-stack candidate in the group of software-stack candidates has a unique combination of software components in the search space, wherein the recommendation engine is further configured to select the recommended software-stack for the target software item from the group of software-stack candidates;
determining, by the processor and based on the recommended software-stack, a build process for building the target software item in the target build environment; and
executing, by the processor, the build process to generate a software build of the target software item in the target build environment.
8. The method of claim 7 , further comprising:
deploying, by the processor, the software build in a target runtime environment, wherein the target build environment is different from the target runtime environment;
determining, by the processor, performance metrics for the software build in the target runtime environment; and
providing, by the processor, feedback to the recommendation engine based on the performance metrics for the software build.
9. The method of claim 8 , wherein the recommendation engine is configured to receive the feedback and adjust a recommendation process for recommending software-stacks based on the feedback.
10. The method of claim 7 , further comprising:
identifying, by the processor and based on the recommended software-stack, specified packages for generating the software build;
determining, by the processor, an installation order for the specified packages; and
installing, by the processor, the specified packages in the target build environment in the installation order.
11. The method of claim 7 , further comprising:
determining, by the processor and based on the recommended software-stack, a hardware component to be used in executing the build process;
selecting, by the processor, a computing cluster having access to the hardware component; and
executing, by the processor, the build process using the computing cluster.
12. The method of claim 7 , wherein the build process is stateless, and wherein the build process is executed by the processor multiple times concurrently for a plurality of target software items.
13. A non-transitory computer-readable medium including instructions that are executable by a processor for performing operations comprising:
receiving, from a recommendation engine, a recommended software-stack for a target software item to be built in a target build environment, wherein the recommendation engine is configured to generate the recommended software-stack using a combinatorial optimization algorithm configured to search a search space for a local minimum or maximum of combinations of dependencies of the target software item that satisfy an objective function to determine a group of software-stack candidates, wherein each software-stack candidate in the group of software-stack candidates has a unique combination of software components in the search space, wherein the recommendation engine is further configured to select the recommended software-stack for the target software item from the group of software-stack candidates;
determining, based on the recommended software-stack, a build process for building the target software item in the target build environment; and
executing the build process to generate a software build of the target software item in the target build environment.
14. The non-transitory computer-readable medium of claim 13 , wherein the operations further comprise:
deploying the software build in a target runtime environment;
determining performance metrics for the software build in the target runtime environment; and
providing feedback to the recommendation engine based on the performance metrics for the software build.
15. The non-transitory computer-readable medium of claim 14 , wherein the recommendation engine is configured to receive the feedback and adjust a recommendation process for recommending software-stacks based on the feedback.
16. The non-transitory computer-readable medium of claim 13 , wherein the operations further comprise:
identifying, based on the recommended software-stack, specified packages for generating the software build;
determining an installation order for the specified packages; and
installing the specified packages in the target build environment in the installation order.
17. The system of claim 1 , wherein the non-transitory memory further includes instructions that are executable by the processor for causing the processor to:
determine environment variables based on the recommended software-stack; and
execute the build process at least in part by setting the environment variables.
18. The system of claim 1 , wherein the non-transitory memory further includes instructions that are executable by the processor for causing the processor to, prior to executing the build process:
determine that a software item or hardware component recommended in the recommended software-stack is inaccessible to the processor; and
in response to determining that the software item or hardware component is inaccessible to the processor:
identify an alternative software item or hardware component; and
configure the build process to exclude the software item or hardware component and to include the alternative software item or hardware component.
19. The system of claim 1 , wherein the non-transitory memory further includes instructions that are executable by the processor for causing the processor to:
determine compiler flags based on the recommended software-stack; and
execute the build process to generate the software build of the target software item in the target build environment, wherein executing the build process involves setting the compiler flags.