The Wayback Machine - https://web.archive.org/web/20200910151725/https://github.com/sql-machine-learning/fluid
Skip to content
develop
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Fluid: Python Instead of YAML for Google Tekton

Fluid is a Python package allowing users to write Teckton workflows in Python.

Here is an example. To the left is a Python program defining a Task and related TaskRun. To the right is the equivalent YAML file.

import fluid as couler

@couler.task
def echo_hello_world(hello, world="El mundo"):
    couler.step(image="ubuntu", cmd=["echo"], args=[hello])
    couler.step(image="ubuntu", cmd=["echo"], args=[world])
---
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
  name: echo-hello-world
spec:
  inputs:
    params:
    - description: ''
      name: hello
      type: string
    - default: El mundo
      description: ''
      name: world
      type: string
  steps:
  - args:
    - $(inputs.params.hello)
    command:
    - echo
    image: ubuntu
    name: example-py-12
  - args:
    - $(inputs.params.world)
    command:
    - echo
    image: ubuntu
    name: example-py-13
echo_hello_world("Aloha")
---
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
  name: echo-hello-world-run
spec:
  inputs:
    params:
    - name: hello
      value: Aloha
  taskRef:
    name: echo_hello_world

For more information, please refer to the following documents.

About

No description, website, or topics provided.

Resources

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
You can’t perform that action at this time.