Pivotal Knowledge Base

Follow

How to get the stack where an app is targeted to during staging

Environment

 Product  Version
 Pivotal Cloud Foundry®   1.7.x, 1.8.x

Overview

This article provides a way to get the stack where an app is targeted to during staging.

Purpose

You might want to customize a buildpack where you want to put logic so it can support either Windows or Linux stack but how would you determine what particular stack was an app targeted to during staging?

Procedure

Cloud Controller sets the CF_STACK environment variable to the stack name during staging but not during the launch.

CF_STACK environment variable sample values are cflinuxfs2, windows2012R2

 

Comments

Powered by Zendesk