description: Issue xref: [go.hocon#99]
sources:
receiver:
parseString: |
version = ${shortversion}-${CI_RUN_NUMBER}
variables { shortversion = "1.2.3" }
parseOptions:
resolveSubstitutions: false
runtime:
fromMap:
CI_RUN_NUMBER: "42"
build:
- { op: take, source: receiver, as: r0 }
- { op: extract, this: r0, path: variables, as: vars }
- { op: withFallback, this: r0, other: runtime, as: r1 }
- { op: withFallback, this: r1, other: vars, as: r2 }
- { op: resolve, this: r2, allowUnresolved: false, useSystemEnvironment: false, as: result }
expect:
outcome: success
isResolved: true
json: |-
{
"CI_RUN_NUMBER": "42",
"shortversion": "1.2.3",
"variables": {
"shortversion": "1.2.3"
},
"version": "1.2.3-42"
}
getter:
- { path: "version", expectString: "1.2.3-42" }
- { path: "variables.shortversion", expectString: "1.2.3" }
- { path: "CI_RUN_NUMBER", expectString: "42" }