Building software using volume snapshots
Techniques are provided for building software using volume snapshots. One method comprises obtaining a volume snapshot of a workspace, wherein the volume snapshot comprises software files associated with a software development project; creating a new workspace from the volume snapshot; applying updates to the new workspace by fetching, from a software development system, code updates to the software files; and performing a software build on the new workspace to compile source code associated with the software files. The new workspace may be created from the volume snapshot using a read-only layer of the volume snapshot and the updates to the new workspace may employ a read-write layer of the volume snapshot. A volume snapshot may be created, in response to a validation of software files, using a given workspace and the updates to the given workspace.
1 . A method, comprising:
obtaining a first volume snapshot of a first workspace associated with a software development project, wherein the first volume snapshot comprises a plurality of source code files associated with the software development project;
creating a second workspace from the first volume snapshot, wherein the second workspace comprises at least a portion of one or more of the plurality of source code files;
applying one or more updates to at least some of the source code files of the second workspace, created from the first volume snapshot, to create an updated second workspace, by fetching, from a software development system, one or more code updates to one or more of the plurality of source code files;
performing a software build on at least some of the updated second workspace to compile the source code associated with the at least some updated source code files associated with the software development project into one or more executable files; and
in response to a validation that (i) the software build succeeded and (ii) a request to merge at least two branches of the software development project succeeded, creating a second volume snapshot using the second workspace and the one or more updates to the second workspace;
wherein the method is performed by at least one processing device comprising a processor coupled to a memory.
2 . The method of claim 1 , further comprising storing the second volume snapshot in at least one volume snapshot repository.
3 . The method of claim 1 , wherein the creating the second workspace from the first volume snapshot employs a read-only layer of the first volume snapshot.
4 . The method of claim 1 , wherein the one or more updates to the second workspace employ a read-write layer of the first volume snapshot.
5 . The method of claim 1 , wherein the first volume snapshot is generated using at least one processing device of an orchestration engine.
6 . The method of claim 1 , further comprising obtaining at least one software repository from the software development system and storing the at least one software repository as a persistent volume.
7 . The method of claim 6 , wherein the creating the second workspace further comprises creating the second workspace from the persistent volume.
8 . The method of claim 6 , further comprising updating the at least one software repository stored as the persistent volume using at least one synchronization service.
9 . An apparatus comprising:
at least one processing device comprising a processor coupled to a memory;
the at least one processing device being configured to implement the following steps:
obtaining a first volume snapshot of a first workspace associated with a software development project, wherein the first volume snapshot comprises a plurality of source code files associated with the software development project;
creating a second workspace from the first volume snapshot, wherein the second workspace comprises at least a portion of one or more of the plurality of source code files;
applying one or more updates to at least some of the source code files of the second workspace, created from the first volume snapshot, to create an updated second workspace, by fetching, from a software development system, one or more code updates to one or more of the plurality of source code files;
performing a software build on at least some of the updated second workspace to compile the source code associated with the at least some updated source code files associated with the software development project into one or more executable files; and
in response to a validation that (i) the software build succeeded and (ii) a request to merge at least two branches of the software development project succeeded, creating a second volume snapshot using the second workspace and the one or more updates to the second workspace.
10 . The apparatus of claim 9 , wherein the creating the second workspace from the first volume snapshot employs a read-only layer of the first volume snapshot and wherein the one or more updates to the second workspace employ a read-write layer of the first volume snapshot.
11 . The apparatus of claim 9 , further comprising obtaining at least one software repository from the software development system and storing the at least one software repository as a persistent volume and updating the at least one software repository stored as the persistent volume using at least one synchronization service.
12 . The apparatus of claim 11 , wherein the creating the second workspace further comprises creating the second workspace from the persistent volume.
13 . The apparatus of claim 9 , further comprising storing the second volume snapshot in at least one volume snapshot repository.
14 . The apparatus of claim 9 , wherein the first volume snapshot is generated using at least one processing device of an orchestration engine.
15 . A non-transitory processor-readable storage medium having stored therein program code of one or more software programs, wherein the program code when executed by at least one processing device causes the at least one processing device to perform the following steps:
obtaining a first volume snapshot of a first workspace associated with a software development project, wherein the first volume snapshot comprises a plurality of source code files associated with the software development project;
creating a second workspace from the first volume snapshot, wherein the second workspace comprises at least a portion of one or more of the plurality of source code files;
applying one or more updates to at least some of the source code files of the second workspace, created from the first volume snapshot, to create an updated second workspace, by fetching, from a software development system, one or more code updates to one or more of the plurality of source code files;
performing a software build on at least some of the updated second workspace to compile the source code associated with the at least some updated source code files associated with the software development project into one or more executable files; and
in response to a validation that (i) the software build succeeded and (ii) a request to merge at least two branches of the software development project succeeded, creating a second volume snapshot using the second workspace and the one or more updates to the second workspace.
16 . The non-transitory processor-readable storage medium of claim 15 , wherein the creating the second workspace from the first volume snapshot employs a read-only layer of the first volume snapshot and wherein the one or more updates to the second workspace employ a read-write layer of the first volume snapshot.
17 . The non-transitory processor-readable storage medium of claim 15 , further comprising obtaining at least one software repository from the software development system and storing the at least one software repository as a persistent volume and updating the at least one software repository stored as the persistent volume using at least one synchronization service.
18 . The non-transitory processor-readable storage medium of claim 17 , wherein the creating the second workspace further comprises creating the second workspace from the persistent volume.
19 . The non-transitory processor-readable storage medium of claim 15 , further comprising storing the second volume snapshot in at least one volume snapshot repository.
20 . The non-transitory processor-readable storage medium of claim 15 , wherein the first volume snapshot is generated using at least one processing device of an orchestration engine.