private fromContext()

in cdk-pipeline/lib/cdk-pipeline-stack.ts [178:187]


  private fromContext(scope: cdk.Construct, key: string): string {

    const result = scope.node.tryGetContext(key);

    if (result) {
      return result.toString();
    } else {
      throw new Error('Unalbe to retrieve context varialbe of ' + key)
    }
  }