Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

Run a project.yaml

Latest
Compare
Choose a tag to compare
@taylordowns2000 taylordowns2000 released this 09 Mar 16:39
· 61 commits to main since this release

This release allows the user to run microservice with a full v2 project.yaml file:

jobs:
  job-1:
    expression: >
      alterState(state => {
        state.data.number = state.data.number * 2
        return state;
      })
    language_pack: '@openfn/language-common'
    trigger: trigger-1
    credential: my-secret-credential
  recurring-job:
    expression: >
      alterState(state => {
        console.log("Hi there!")
        return state;
      })
    language_pack: '@openfn/language-common'
    trigger: every-minute
  flow-job:
    expression: >
      alterState(state => {
        state.data.number = state.data.number * 3
        return state;
      })
    language_pack: '@openfn/language-common'
    trigger: after-j1
  catch-job:
    expression: >
      alterState(state => {
        state.message = "handled it."
        return state;
      })
    language_pack: '@openfn/language-common'
    trigger: j1-fails

triggers:
  trigger-1:
    criteria: '{"number":2}'
  every-minute:
    cron: '* * * * *'
  after-j1:
    success: job-1
  j1-fails:
    failure: job-1

credentials:
  my-secret-credential:
    username: '******'
    password: '******'