Closed jimsheldon closed 9 months ago
Here is an example v1 yaml
stages: - name: test spec: envs: STAGE_VARIABLE: value platform: arch: amd64 os: linux runtime: spec: {} type: cloud steps: - name: hello spec: image: busybox run: | echo hello shell: bash type: script type: ci version: 1
which converts to this v0 yaml
pipeline: identifier: default name: default orgIdentifier: default projectIdentifier: default properties: ci: codebase: build: <+input> stages: - stage: identifier: test name: test spec: cloneCodebase: true execution: steps: - step: envVariables: STAGE_VARIABLE: value identifier: hello name: hello spec: command: | echo hello image: busybox shell: Bash timeout: "" type: Run platform: arch: Amd64 os: Linux runtime: spec: {} type: Cloud type: CI
envVariables is not valid at this level, STAGE_VARIABLE is not available to the hello step shell commands.
envVariables
STAGE_VARIABLE
hello
It should convert to this v0 yaml
pipeline: identifier: default name: default orgIdentifier: default projectIdentifier: default properties: ci: codebase: build: <+input> stages: - stage: identifier: test name: test spec: cloneCodebase: true execution: steps: - step: identifier: hello name: hello spec: command: | echo hello image: busybox shell: Bash timeout: "" type: Run platform: arch: Amd64 os: Linux runtime: spec: {} type: Cloud type: CI variables: - name: STAGE_VARIABLE type: String description: "" required: false value: value
Valid values for type are String, Secret and Number, I think we only need to worry about String and Number. We might be able to get away with treating everything as String with double quotes and not worry about Number.
type
String
Secret
Number
Fix in #140
Here is an example v1 yaml
which converts to this v0 yaml
envVariables
is not valid at this level,STAGE_VARIABLE
is not available to thehello
step shell commands.It should convert to this v0 yaml
Valid values for
type
areString
,Secret
andNumber
, I think we only need to worry aboutString
andNumber
. We might be able to get away with treating everything asString
with double quotes and not worry aboutNumber
.