Skip to content

project.yaml can use URI scheme for job expressions and credential bodies #14

Open
@taylordowns2000

Description

@taylordowns2000

in a project.yaml, users should be able to specify URI paths to job expressions, rather than expressions as stings. See portability proposal v3: https://docs.openfn.org/documentation/portability#proposal-v3

Note how credentials are shaped: they either have keys and values inside a keyed object, or only have a path to the full body (i.e., some-credential.json)

jobs:
  job-1:
    expression: "alterState(state => ({ ...state, changed: true }))"
    trigger: trigger-1
  job-2:
    expression: file:///home/taylor/cool-job.js
    trigger: trigger-1
  job-3:
    expression: github:openfn/sample/myJob.js
    trigger: trigger-1
  job-4:
    expression: http://www.github.com/openfn/sample2.js
    trigger: trigger-1

credentials:
  my-secret-credential:
    username: '******'
    password: '******'
  my-other-credential: 'file://gcp_credential.json'

we should start with standard URIs, but maybe include some of the above.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions