Can we have condition in Artifacts of the .gitlab-ci.yml

Am try to do multiple product deployment using the .gitlab-ci.yml.
Am not able to upload the artifacts using the
artifacts:
paths:
- |
if [[ {DEPLOY} == 'SB' ]]; then sb/src/g******_ops_{MODULE}sb_app/target/.zip
else
be/src/g
*****
${MODULE}_be/target/*.zip
fi

can this be done in this way , Any pointer will be help ful

Hello Manikanta532,

Have you considered configuring two jobs, each realizing one part of the if-clause? Here is a sketch

jobA:
   ...
    rules:
        - if: $DEPLOY == 'SB'
    artifacts:
        - sb/src/g******_ops_{MODULE}sb_app/target/.zip

jobB:
   ...
    rules:
        - if: $DEPLOY != 'SB'
    artifacts:
        - be/src/g*****${MODULE}_be/target/*.zip

Besr regards

Hi
Thank for this suggestion, will try it.