Open petter-eikeland opened 1 year ago
@petter-eikeland when you use includeOnlyArtifacts. didn't it automatically install the dependency of the filtered artifacts?
@azlam-abdulsalam includeOnlyArtifacts:
installs both the packages and dependencies of those packages automatically yes. But I want a pool with all external dependencies of the repo installed, but not all packages. E.g. I want all the external dependencies of the bicx-core package to be installed, but not deploy bicx-core if that makes sense? I thought perhaps the includeOnlyPackageDependencies
is used for this?
it doesn't at the moment ☺️, missed the scenario!
This is more towards creation of the release definition where you have an option to install dependencies.
Will address this as a bug
now for the install dependency command when used directly, can you help me how did you set up the script?
Awesome! Thx for such swift help.
For the install dependency command, I did the following:
Create a installPreDependencies.sh
bash script for executing the dependency install script for all prepared scratch orgs:
#!/bin/bash
# Install all external dependencies
sfdx sfpowerscripts dependency install -u $1 -v $2
Create release config for pool:
# List of packages that should be installed
release: "test-pool"
includeOnlyArtifacts:
#-------------- Framework Packages------------#
- nebula-logger-core
- trigger-actions-framework
#-------------- Core Packages------------#
- core-components
Create Config File for pool
{ "$schema": "https://raw.githubusercontent.com/Accenture/sfpowerscripts/develop/packages/sfpowerscripts-cli/resources/schemas/pooldefinition.schema.json", "tag": "bicx-validate", "maxAllocation": 20, "expiry": 1, "batchSize": 10, "configFilePath": "config/project-scratch-def.json", "enableSourceTracking": false, "succeedOnDeploymentErrors": false, "installAll": true, "releaseConfigFile": ".azure-pipelines/release-definitions/pool/bicx-pool-preinstalled-packages.yml", "preDependencyInstallationScriptPath":"./.azure-pipelines/scripts/installPreDependencies.sh", "fetchArtifacts": { "npm": { "scope": "@org" } } }
4. Run `sfdx sfpowerscripts:orchestrator:prepare -f config/bicx-pool-def.json -v devhub --npmrcpath $(npmrc.secureFilePath)`
Describe the bug Trying to create a pool of scratch orgs with all external dependencies, and some packages. Currently I'm using the
releaseConfigFile
parameter to specify the packages I want installed. However, I had some issues specifying external dependencies in the releaseConfigFile. Thus, I tried adding the sfdx sfpowerscripts:dependency:install command using either thepreDependencyInstallationScriptPath
&postDeploymentScriptPath
commands. This command successfully installs all external dependencies, but it fails as it messes up the prepare logs (see screenshots below).I might be looking in the wrong direction, and could be that the
releaseConfigFile
parameter should also help resolve external dependencies? I have tried using theincludeOnlyPackageDependencies
&packageDependencies
parameters in the releaseConfig YAML file. But this did not make the Prepare command install the external dependencies.To Reproduce
releaseConfigFile
parameter to install the packages that you want:preDependencyInstallationScriptPath
orpostDeploymentScriptPath
.Expected behavior Pool is successfully created without any errors. External dependencies are installed either by using
includeOnlyPackageDependencies
orpackageDependencies
parameters OR by using sfdx sfpowerscripts:dependency:install in apreDependencyInstallationScriptPath
orpostDeploymentScriptPath
Screenshots
Platform Details (please complete the following information): OS: Linux Version [e.g. CLI Version eg: 1.6.6] LATEST (20.26.3) Salesforce CLI(sfdx cli) Version: 7.186.2 CI Platform: Azure DevOps