Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: submit from workflowtemplate #2120

Merged
merged 4 commits into from
Aug 10, 2022
Merged

feat: submit from workflowtemplate #2120

merged 4 commits into from
Aug 10, 2022

Conversation

whynowy
Copy link
Member

@whynowy whynowy commented Aug 2, 2022

Signed-off-by: Derek Wang whynowy@gmail.com

argoWorkflow trigger supports submit-from workflow template.

Closes: #2044

Checklist:

Signed-off-by: Derek Wang <whynowy@gmail.com>
Copy link
Member

@daniel-codefresh daniel-codefresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

case "cronworkflow":
wf = "cronwf"
kind = "cronwf"
case "workflow":
Copy link
Member

@sarabala1979 sarabala1979 Aug 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argo doesn't support
argo submit --from wf/ <name>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Signed-off-by: Derek Wang <whynowy@gmail.com>
Signed-off-by: Derek Wang <whynowy@gmail.com>
Signed-off-by: Derek Wang <whynowy@gmail.com>
@whynowy whynowy merged commit 4206495 into argoproj:master Aug 10, 2022
@whynowy whynowy deleted the submtpl branch August 10, 2022 06:18
daniel-codefresh pushed a commit to daniel-codefresh/argo-events that referenced this pull request Aug 26, 2022
* feat: submit from workflowtemplate

Signed-off-by: Derek Wang <whynowy@gmail.com>
Signed-off-by: Daniel Soifer <daniel.soifer@codefresh.io>
whynowy added a commit that referenced this pull request Sep 10, 2022
* feat: submit from workflowtemplate

Signed-off-by: Derek Wang <whynowy@gmail.com>
@thpham
Copy link

thpham commented Nov 16, 2022

Hello,

do this also support passing parameters ? , because I'm having trouble with such source.

apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: bitbucketserver
spec:
  template:
    serviceAccountName: operate-workflow-sa
  dependencies:
  - name: demo-dep
    eventSourceName: bitbucketserver
    eventName: demo
    filters:
      data:
        - path: body.eventKey
          type: string
          comparator: '='
          value:
          - 'pr:comment:added'
  triggers:
    - template:
        conditions: demo-dep
        name: test-pr-created
        argoWorkflow:
          operation: submit-from
          source:
            resource:
              apiVersion: argoproj.io/v1alpha1
              kind: WorkflowTemplate
              metadata:
                name: mvn-library-workflow
              spec:
                arguments:
                  parameters:
                  - name: git_repo
                    value: ''
                  - name: git_branch
                    value: ''
          ## Apply parameters for workflow resource from WorkflowTemplate
          paramaters:
          - dest: spec.arguments.paramters.0.value
            src:
              dependencyName: demo-dep
              dataKey: body.pullRequest.fromRef.repository.links.clone.0.href
          - dest: spec.arguments.paramters.1.value
            src:
              dependencyName: demo-dep
              dataKey: body.pullRequest.fromRef.displayId
      ## Apply parameters to the template
      #paramaters:

Thank you for your help !

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.

Submit-from in Sensor not possible with WorkflowTemplates
4 participants