0

I'm trying to realize Blue/green deployment along the lines of this answer. What I'm after is to deploy each branch into a SF cluster with a different name from Jenkins. One thing that's leaving me stumped is how to override service end point port number at deployment time?

Do I have to resort to token replacement in the service manifest at deployment?

The docs say that I can leave the port unspecified and a random port is allocated... But, then, how do I discover the allocated port number?

Community
  • 1
  • 1
Raghu
  • 1,140
  • 1
  • 14
  • 22

2 Answers2

0

I may be misunderstanding the question. Why not have a different deployment. For example I have a local and azure cluster deployment. It's easy to have more than 2 deployments

Nick Randell
  • 17,805
  • 18
  • 59
  • 74
  • I have a cloud and local profile. However we do our work in branches, and what I want is being able to deploy each branch as it's own app if needed into the same SF cluster - fabric:/myapp-branch – Raghu Jul 25 '16 at 01:45
0

If you have different branches you could just let the different branchens have different ports in the ServiceManifests.

If you do decide to go with random port allocations you can read the port from the EndpointResourceDescription when opening your communication listener

serviceContext.CodePackageActivationContext.GetEndpoint(endpointName).Port
John Nilsson
  • 17,001
  • 8
  • 32
  • 42