Create a Delta Package

Task ID

Latest Version

sfpwowerscripts-createdeltapackage-task

6.0.6

This task is used to build a changeset (Delta/Diff between two git commits) based artifact based on the changes between two commits, which can then be associated with a release pipeline. It is only recommended you utilise a changeset based build process when working on an existing org in the process of refactoring, to eventually utilize modular (source based/unlocked packaging) repositories.

This task utilizes the sfpowerkit:project:diff. In case you face any issues with the diff not being accurate, please raise an issue in the sfpowerkit github repository.

Prerequisites

Install SFDX with Sfpowerkit task must be added to the pipeline before utilizing this task

Task Snapshot

Parameters

Input
Output
YAML
Input

Classic Designer Labels are in Bold, YAML Variables are in italics

  • Name of the package / package

    Provide a name of the package

  • The name of the version that needs to be associated with the diff package / version_name

    Provide a version name to identify this particular delta/diff when used in the release pipeline.

  • Revision ID (Git Commit ID) from where the diff should baselined on / revision_from

    Provide the full SHA Commit ID, from where the diff should be generated from

  • Revision ID (Git Commit ID) from where the diff should baselined upto / revision_to

    Provide the full SHA Commit ID, from where the diff should baselined upto

  • Generate Destructive Manifest based on the diff / generate_destructivemanifest

    Check this option to generate a destructive manifest, based on the delta/diff between the provided commits

  • SFDX Project directory that needs to be deployed / project_directory

    Leave it blank if the sfdx-project.json is in the root of the repository, else provide the folder directory containing the sfdx-project.json

  • Set the pipeline’s build number to the the version name mentioned in the task / set_build_name

    Check this option if the build number of the pipeline has to match the version name provided in the field version_name

  • Create a build artifact with the package id if the delta package creation is successful / build_artifact_enabled

    Create a build artifact, so that this pipeline can be consumed by a release pipeline

  • Bypass directories** / bypass_directories

    Exclude a comma-separated list of directories from the generated diff.

  • Generate diff only for the directories mentioned** / only_diff_for

    Define a comma-separated whitelist of directories to be included in the generated diff. Creates a sfdx-project.json to support deployment.

  • API version to be used if sfdx-project.json is generated** / apiversion

    Define the API version if a sfdx-project.json was generated as part of the the 'Generate diff only for the directories mentioned' parameter.

** Experimental commands

Output

sfpowerscripts_delta_package_path

The path to the directory where the delta package is created.

YAML
steps:
displayName: 'Create Delta Package based on two commits'
inputs:
package: <mypackage>
project_directory: [dir]
revision_from: '$(LATEST_STABLE_TAG)'
revision_to: '$(Build.SourceVersion)'

Changelog

  • 6.0.6 Refactor artifact structure #131

  • 5.0.9 Update Core dependency

  • 5.0.4 Remove Telemetry Collection

  • 4.0.9 Refactored to use revamped folder structure

  • 3.0.0 Support for this task in release pipelines

  • 2.0.5 Support for creation of multiple packages in a single build such as in a MonoRepo

  • 1.0.0 Initial Version

Edit on GitHub