Code quality PR pipelines don’t inherit JFrog credentials in Cloud Manager

Code quality pull request (PR) pipelines in Adobe Experience Manager as a Cloud Service don’t automatically inherit JFrog credentials when their configuration in .cloudmanager/pr_pipelines.yml is incorrect. As a result, PR pipelines can’t connect to a private JFrog repository because the required pipeline variables aren’t passed down from the template pipeline. Correcting the YAML structure ensures that PR pipelines clone the necessary variables and can authenticate with JFrog successfully. To fix this, configure a template pipeline with the correct variables, update the .cloudmanager/pr_pipelines.yml file to reference it properly, validate Maven settings, and recreate PR pipelines if required.

Description description

Environment

  • Adobe Experience Manager as a Cloud Service – Sites
  • Cloud Manager

Issue/Symptoms

  • Code quality PR pipelines fail to connect to a private JFrog repository because required credentials aren’t available.
  • Pipeline variables defined in the template pipeline aren’t cloned into newly created PR pipelines.
  • The .cloudmanager/pr_pipelines.yml file is configured incorrectly, preventing variable inheritance.

Resolution resolution

Follow these steps to resolve the issue:

  1. Create a template pipeline in Cloud Manager that includes required JFrog credentials as pipeline variables, not environment variables.

  2. Set pipeline variables such as JFROG_USERNAME and JFROG_PASSWORD or JFROG_API_TOKEN using the Cloud Manager UI or CLI. Confirm the pipeline can retrieve artifacts from JFrog by running it once.

  3. Ensure Maven uses these variables by configuring them in .cloudmanager/maven/settings.xml:

    code language-none
    <settings>
      <servers>
        <server>
          <id>jfrog-repo</id>
          <username>${env.JFROG_USERNAME}</username>
          <password>${env.JFROG_PASSWORD}</password>
        </server>
      </servers>
    </settings>
    
  4. On the repository’s default branch, create or update .cloudmanager/pr_pipelines.yml so PR pipelines clone the template pipeline configuration:

    code language-none
    pullRequest:
      github:
        shouldDeletePreviousComment: false
        shouldSkipCheckAnnotations: false
    
    pipelines:
      - type: CI_CD
        template:
          programId: <PROGRAM_ID>
          pipelineId: <TEMPLATE_PIPELINE_ID>
          namePrefix: "Full Stack Code Quality Pipeline for PR"
        importantMetricsFailureBehavior: CONTINUE
    
  5. Commit the YAML file and create a new PR. Cloud Manager generates a PR pipeline that inherits variables from the template pipeline.

  6. For existing PRs, close and reopen the PR or delete the auto-generated PR pipeline and push a new commit. Cloud Manager regenerates the pipeline with the corrected configuration.

  7. Verify in build logs that PR pipelines authenticate successfully with JFrog and no 401, 403, or repository timeout failures occur.

recommendation-more-help
experience-cloud-kcs-help-kbarticles