Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Orchestrator should ignore packageDirectories without a "package" attribute #842

Closed

Description

@rody

Orchestrator requires all packageDirectories in the sfdx-project.json to be declared as packages (i.e. it requires package and versionNumber attributes).

Salesforce DX allows to declare directories that are not packages. This is quite useful when you want to have a specific path for the metadata that you pull from a Scratch Org.

To Reproduce
Add the following to the packageDirectories in sfdx-project.json:

{
  "path": "tmp",
  "default": true
}

and run sfdx sfpowerscripts:orchestrator:build

It results in the following error

ERROR running sfpowerscripts:orchestrator:build:  The sfdx-project.json is invalid, Please fix the following errors

1: /packageDirectories/2: must have required property 'package' {
    "missingProperty": "package"
}
2: /packageDirectories/2: must have required property 'versionNumber' {
    "missingProperty": "versionNumber"

Expected behavior
The tmp packageDirectory is ignored from the list of packages to create (because it does not have a package or versionNumber attribute). The other packages are built.
Optionally a info message could be displayed saying that the directory is ignored because it's not a package.

Implementation note: If package is present but not versionNumber (and vice-versa), then sfpowerscripts should fail with an error message, since the package definition is incomplete.

Activity

  1. added
    enhancement
    on Feb 16, 2022
  2. azlam-abdulsalam commented on Feb 16, 2022

    @azlam-abdulsalam
    Contributor

    Thanks @rody for raising this. Will try to add this as part of April's release

  3. added 3 commits that reference this issue on Jun 9, 2022
    b22298c
    7baface
    5f64de4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions