drone / go-convert

Package convert provides tools for converting pipeline configuration files to the Drone format.
Apache License 2.0
11 stars 20 forks source link

[cloudbuild] support for `steps[*].allowExit` #63

Open bradrydzewski opened 1 year ago

bradrydzewski commented 1 year ago

https://cloud.google.com/build/docs/build-config-file-schema#allowexitcodes

Use the allowExitCodes field to specify that a build step failure can be ignored when that step returns a particular exit code.

steps:
- name: 'ubuntu'
 args: ['-c', 'exit 1']
 allowExitCodes: [1]
steps:
- name: 'ubuntu'
 args: ['echo', 'Hello World']

Update added support for allowExitCodes but this is not yet supported by Harness

bradrydzewski commented 1 year ago

This was added to the v1 spec and the mapping is complete, however, v1 does not support this capability yet.

https://github.com/drone/go-convert/blob/fa88d1e840237b74941669da12af6d5692a473c4/convert/cloudbuild/convert.go#L311:L323