Skip to content

feat:[CI-22033]: map cache and build intelligence storage fields in v0… - #354

Open
satyakota04 wants to merge 1 commit into
masterfrom
CI-22033
Open

feat:[CI-22033]: map cache and build intelligence storage fields in v0…#354
satyakota04 wants to merge 1 commit into
masterfrom
CI-22033

Conversation

@satyakota04

Copy link
Copy Markdown
Contributor

Summary

  • Keep cache paths as paths (no longer convert to path).
  • Parse the extra v0 cache and build-intelligence fields from harness-core and emit the matching v1 YAML names.
  • Cover the converters with unit tests (TestConvertCaching, TestConvertBuildIntelligence).

Cache (v0 caching → v1 cache)

v0 YAML v1 YAML Conversion
enabled enabled copy
paths paths copy (plural stays plural)
key key copy
policy policy copy
override override copy
connectorRef connector rename
region region copy
bucket_name bucket_name copy
containerName container_name camelCase → snake_case
storageAccount storage_account camelCase → snake_case
runAsUser user rename
resources resources ConvertContainerResources

Build intelligence (v0 buildIntelligence → v1 build-intelligence)

v0 YAML v1 YAML Conversion
enabled enabled copy
connectorRef connector rename
region region copy
bucket_name bucket_name copy
runAsUser user rename
resources resources ConvertContainerResources
port v1-only; not set from v0
maven-url v1-only; not set from v0
container_name v1-only; not set from v0
storage_account v1-only; not set from v0

Files

  • convert/harness/yaml/pipeline.go — v0 Cache and BuildIntelligence structs
  • convert/v0tov1/yaml/cache.go — v1 cache schema (paths, storage fields, user)
  • convert/v0tov1/yaml/build_intelligence.go — v1 build-intelligence schema
  • convert/v0tov1/convert_helpers/convert_stage_ci.goConvertCaching / ConvertBuildIntelligence
  • convert/v0tov1/convert_helpers/convert_stage_ci_test.go — unit tests

… to v1

Keep cache paths as paths and convert connectorRef, runAsUser, and storage
fields so converted YAML matches the v1 cache and build-intelligence schemas.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants