Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Multiple builds as part of an application
-
Hello,
Bit of a noob question I'm afraid, but I just want to make sure I start on the right path. I need to setup an application that builds from 2 repositories, and in the release pipeline always takes the latest builds from both repo's for deployment. I have actually alrady been able to connect both repo's and create the builds, but how do I reference the latest builds in the deployment scripts?
I have so far only setup a pipeline for a single component, and there the connection to the build and artifact is implicit, but I guess for this scenario I need to define something more explicit?Thanks,
Justin
-
Hi @Justinvolved,
I don't know if I'm totally tracking the structure, and what you mean by "referencing the latest builds" in the deployment scripts.
Are you looking to have three applications? One app per repo, and then a "controller" application?
Or, do you want to have one application that builds from two repos? And it will always build/deploy content from those at the same time?
Dean
-
Hi Dean,
Thanks for your reply.
My current setup is that I have one application, with one repo connected.
For a next version of the application I need to add a build from another repo to that same application.
My first thought was to add this repo to the same application, and then build both during the build step, as you describe in the last sentence indeed it will then always build/deploy from both repo's at the same time...Right now I'm just using Git::Checkout-Code without any parameters, but when there ismore than 1 repo I think I need to specify which repo/branch/commit I would like to build from?
For now if I could just take the latest commit of the main branch of each repo I would be ok.Also the same might apply later on in the deployment scripts, because there I use Deploy-Artifact();. But when there is more than 1 build, I think I need to make sure to get the right artifact connected to a build from a specifc repo.
I'm not sure if I'm on the right path with this to be honest, because I realize now I could probably also add the addtional repo as a seperate application, and then reference a latest build from that application in my current application. Any comments on what might be a better/easier setup I would appreciate very much :-)
Thanks.
Justin
-
Hi @Justinvolved ,
The biggest consideration for using "separate applications" is versioning and independent deployment. For example, our extensions are all separate applications, but nearly all of them are bundled with product release. For example, see the the the
%ExtensionVersions
variable on a recent build of BuildMaster.The
Git::Checkout-Code
will default to$Commit
and$Repository
variable functions for theBranchOrCommit
andFrom
arguments; those variable functions contain the values that you selected when creating a build. So you can just specify different values as needed.See: https://docs.inedo.com/docs/buildmaster-git-source-control#build-scripts-operations
Likewise, the
Deploy-Artifact
operation defaults to$ApplicationName
,$BuildNumber
,Default
, etc, so you can specify values as needed.But like all things in software, no matter what approach you use, it will probably end up being "wrong" and you'll want to redo it later. So just plan on doing a "v2" down the line :)
Alana