I've the following workflow template which has when condition when: "'{{item}}' =~ '^tests/'", artifacts input as file path in AWS S3 bucket and withParam loop.
Here is my workflow template
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: process-wft
spec:
entrypoint: main
templates:
- name: main
inputs:
parameters:
- name: dir-process
default: true
- name: dir
artifacts:
- name: Code
dag:
tasks:
- name: process-wft-tests
when: "'{{item}}' =~ '^tests/'"
templateRef:
name: tf-wf-rn
template: main
arguments:
parameters:
- name: dir-process
value: "{{inputs.parameters.dir-process}}"
artifacts:
- name: Code
from: "{{inputs.artifacts.Code}}"
withParam: "{{inputs.parameters.dir}}"
here is my input artifact Code extracted result which is being passed from my workflow
inputs:
artifacts:
- archive:
tar:
compressionLevel: 9
archiveLogs: true
globalName: GitSource
name: Code
path: /mnt/out/code
s3:
key: process-kfxqf/process-kfxqf-1938174407/GitSource.tgz
It is giving the below Error when I run my workflow
message: failed to resolve {{inputs.artifacts.Code}}
What's the mistake am doing here? if it doesn't work what's the alternate way to get this worked?
Note: I tried workflow execution by removing when condition, it is working fine. It is giving issue only when I add when condition.