Symptoms
A variable is inaccessible when called from a Composition
Cause
A variable has to be added to your Composition's Environment.
Solution
In your Environments settings, you will need to call the Codefresh variable.
services:
name: yourservice
composition:
yourservicename:
image: yourserviceimage
ports:
- 5432
environment:
- 'CFVARIABLENAME=${{CFVARIABLENAME}}'
Notes
In both setup and readiness Service steps, Codefresh exported variables are accessible by default.