apiVersion: tekton.dev/v1alpha1
kind: Condition
metadata:
  name: super-condition
spec:
  check:
    image: python:alpine3.6
    script: "python -c 'import sys\ninput1=str.rstrip(sys.argv[1])\ninput2=str.rstrip(sys.argv[2])\n\
      try:\n  input1=int(input1)\n  input2=int(input2)\nexcept:\n  input1=str(input1)\n\
      sys.exit(0) if (input1 $(params.operator) input2) else sys.exit(1)' '$(params.operand1)'\
      \ '$(params.operand2)'"
  params:
  - name: operand1
  - name: operand2
  - name: operator
