Multi-workspace builds

Hi :slight_smile:

Our current deploy process creates a single docker image which we then promote through UAT and into Production. Our apps load their config based on a ‘DEPLOY_ENVIRONMENT’ env value with some additional extra config injected by a levant-templated nomad file (we use levant to output 2 separate nomad files, one for uat, one for prod).

I can certainly see how using workspaces to track deploy environment could be very helpful and I can also see how I could template a nomad job file in waypoint using the new features in v0.4 and referring to the ‘workspace’ variable.

However, I can’t work out how I’d go about creating a build that can be used in both the uat and production workspaces. I’d certainly not want to build twice just to solve this.

Is there a way to create a build that can be shared across workspaces? Even better, is it possible to define at the build stage which workspaces a build is allowed to be used in?

Or have I completely missed the mark?

If not workspaces, I can only think I’d need to just use a default workspace and wait for support for user-inputed env vars so I can pass in the existing DEPLOY_ENVIRONMENT value to waypoint.

Hi robertg,

Great question! It’s on our roadmap to allow users to define multiple environments (i.e. production and pre-production) with workspaces and promote the same artifact between them, but it has not been implemented yet.

You are right in thinking that it will be possible to use user input variables to address this problem when the feature becomes available.

This is an important use-case that we’re planning to address more comprehensively in the future. Thank you for raising it!

Izaak

2 Likes