The Git branch associated with the pipeline cannot be found

  • Error message: Invalid pipeline: XXXXXX. Reason=Branch=xxxx not found in repository.
    Invalid pipeline: XXXXXX. Reason=Branch=xxxx not found in repository
  • Cause: The Git branch the pipeline is configured to use has been deleted.
  • Resolution: Re-create the missing Git branch using the exact same name, or re-configure the pipeline to build from a different, existing branch.

Build & Unit Testing

Build and Unit Testing

The Build and Unit Testing phase performs a Maven build (mvn clean package) of the project checked out from the pipeline’s configured Git branch.

Errors identified in this phase should be re-producible building the project locally, with the following exceptions:

  • A maven dependency not available on Maven Central is used, and the Maven repository containing the dependency is either:

    • Unreachable from Cloud Manager, such as a private internal Maven repository, or the Maven repository requires authentication and the incorrect credentials have been provided.
    • Not explicitly registered in the project’s pom.xml. Note that, including Maven repositories is discouraged as it increases build times.
  • Unit tests fail due to timing issues. This may occur when unit tests are timing-sensitive. A strong indicator is relying on .sleep(..) in the test code.

  • The use of unsupported Maven plugins.

Code Scanning

Code Scanning

Code scanning performs static code analysis using a mix of Java and AEM-specific best practices.

Code scanning results in a build failure if a Critical Security vulnerabilities exist in the code. Lesser violations can be overridden, but it is recommended they are fixed. Note that code scanning is imperfect and can result in false positives.

To resolve code scanning issues, download the CSV-fomatted report provided by Cloud Manager via the Download Details button and review any entries.

For more details see AEM specific rules, see Cloud Manager documentations’ custom AEM-specific code scanning rules.

Build Images

Build Images

Build image is responsible for combining the built code artifacts created in the Build & Unit Testing step with the AEM Release, to form a single deployable artifact.

While any code build and compilation issues are found during Build & Unit Testing, there may be configuration or structural issues identified when attempting to combine the custom build artifact with the AEM release.

Duplicate OSGi configurations

When multiple OSGi configurations resolve via runmode for the target AEM environment, the Build Image step fails with the error:

[ERROR] Unable to convert content-package [/tmp/packages/enduser.all-1.0-SNAPSHOT.zip]:
Configuration 'com.example.ExampleComponent' already defined in Feature Model 'com.example.groupId:example.all:slingosgifeature:xxxxx:X.X',
set the 'mergeConfigurations' flag to 'true' if you want to merge multiple configurations with same PID

Cause 1

  • Cause: The AEM project’s all package, contains multiple code packages, and the same OSGi configuration is provided by more than one of the code packages, resulting in a conflict, resulting the Build Image step unable to decide which should be used, thus failing the build. Note this does not apply to OSGi factory configurations, as long as they have unique names.
  • Resolution: Review all code packages (including any included 3rd party code packages) being deployed as part of the AEM application, looking for duplicate OSGi configurations that resolve, via runmode, to the target environment. The error message’s guidance of “set the mergeConfigurations flag to true” is not possible in AEM as a Cloud service, and should be ignored.

Cause 2

  • Cause: The AEM project’s incorrectly includes the same code package twice, resulting in the duplication of any OSGi configuration contained in said package.
  • Resolution: Review all pom.xml’s of packages embedded in the all project, and ensure they have the filevault-package-maven-plugin configuration set to <cloudManagerTarget>none</cloudManagerTarget>.

Malformed repoinit script

Repoinit scripts define baseline content, users, ACLs, etc. In AEM as a Cloud Service, repoinit scripts are applied during Build Image, however on AEM SDK’s local quickstart they are applied when the OSGi repoinit factory configuration is activated. Because of this, Repoinit scripts may quietly fail (with logging) on AEM SDK’s local quickstart, and but cause the Build Image step to fail, halting deployment.

  • Cause: A repoinit script is malformed. This may leave your repository in an incomplete state as any repoinit scripts after the failing script are not executed against the repository.
  • Resolution: Review the AEM SDK’s local quickstart when the repoinit script OSGi configuration is deployed to determine if and what the errors are.