GitHub Pipelines for Customer Projects

Important: Starting with pfxpackage v3.41+, you must include options: --user 0 in the job's container configuration that uses the pricefx/pfxpackage image; otherwise, there’ll be a permission failure in GitHub Actions.

This guide is intended for partners and customers who want to use their ownth GitHub as their Git repository and CI/CD tool instead of GitLab.

Prerequisites

  • Create a user account pfx.deploy in the target partitions (QA, PROD). Assign General Admin privileges in each partition where you plan to deploy. Set a password and keep it safe; you will set it later in the PFX_PASS secret in GitHub.

The password must be at least 14 characters long, have at least 1 digit, and have at least 1 capital letter.

  • pom.xml must be present in the project root folder. If not, generate it in Studio by right-clicking the project and navigating to Pricefx > Create 'pom.xml'.

  • Ensure you have sufficient permissions in GitHub to manage the repository settings.

Step-by-step tutorial in GitHub

  1. Generate the workflow file in Studio. Right-click the project and navigate to Pricefx > CI Deployment > Create github-ci.yml. Map each source branch to its target environment (cluster URL and partition are derived from the mapping). Commit and push the generated file at .github/workflows/github-ci.yml in your GitHub repository.

  2. Configure repository secrets and variables. Navigate to Settings > Security > Secrets and variables > Actions and add:

    1. PFX_USER as a Variable — set to pfx.deploy.

    2. PFX_PASS as a Secret — set to the deployment user's password.

You're all set. From now on:

  • A pull request runs Verify (Maven unit tests) and Analyze (pfxprobe code analysis).

  • A push to a mapped branch runs Verify, Analyze, and Deploy (pfxpackage tool) to the target partition.

See also: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions