Trigger fails to deploy with artifact source issues

Problem Statement:

While trying to set up a Workflow/ Pipeline using Harness FirstGen step. Users may want to push a single image used by 2 services. A situation may arise where the service can be manually deployed to both services, but an error may occur while trying to deploy the same image using a trigger. The trigger will successfully execute, but the artifact field will appear empty on the deployments page.

Screen Shot 2023-04-27 at 3.47.43 PM

An error will appear in the execution UI logs

The "" is invalid: patch: Invalid value: "map[data:map[.dockercfg:${artifact.source.dockerconfig}] metadata:map[annotations:map[{\"apiVersion\":\"v1\",\"data\":{\".dockercfg\":\"${artifact.source.dockerconfig}\"},\"kind\":\"Secret\",\"metadata\":{\"annotations\":{\"\":\"kubectl apply --kubeconfig=config --filename=manifests.yaml --record=true\"},\"name\":\"optic-console-dockercfg\",\"namespace\":\"d6e1\"},\"type\":\"\"}\n]]]": error decoding from json: illegal base64 data at input byte 0

You will need to select the Artifact Source which belongs to the new Service in the Trigger configuration. If you look closely at the Artifact source in the trigger, it may be pointing to the First service.

Screen Shot 2023-04-27 at 3.48.53 PM