While trying to deploy a dispatcher pipeline one customer was running into an issue - whenever they were trying to deploy it as a Web Tier pipeline, the deployment failed with the error
ERROR: '44 CUSTOMER Opt-in file //opt-in/USE_SOURCES_DIRECTLY is not present. Build aborted.' at runBuild(/usr/local/bin/build-zip.sh:203) at status.track(/usr/local/bin/lib-status.bash:261) at main(/usr/local/bin/build-zip.sh:214) ERROR: Unexpected error type: 'CUSTOMER' at status.internal.errorStatus(/usr/local/bin/lib-status.bash:25) at status.error(/usr/local/bin/lib-status.bash:142) at runBuild(/usr/local/bin/build-zip.sh:203) at status.track(/usr/local/bin/lib-status.bash:261) at main(/usr/local/bin/build-zip.sh:214) ERROR: '1 TEST_FAILURE
However, when running it via Full Stack Pipeline then it worked.
The customer was using a standard AEM project created using the latest archetype for the cloud therefore the dispatcher’s configuration, being created based on the latest archetype, already followed the “Flexible mode” and the file /opt-in/USE_SOURCES_DIRECTLY was present
It seemed that the customer’s web tier pipeline had the CodeLocation set to “/” but the repo they had set on this pipeline was using “/dispatcher/src” instead.
After changing the code location 1 to “/dispatcher/src” the Web Tier pipeline was successfully deployed.