SharePoint APP Package Deployment
This is a project created for automating the deployment process of SharePoint application packages in the App Catalog site.
Installation
Run the following command to install the node-sppkg-deploy
:
$ npm install node-sppkg-deploy --save-exact
Usage
Once you installed this dependency, you can make use of it with the following provided sample code:
const sppkgDeploy = ; sppkgDeploy; // OR sppkgDeploy; // OR sppkgDeploy;
Arguments / options
The following arguments / options can be passed for deploying the package.
username (required)
Type: String
Default: ""
Sets the username to be used for the deployment.
password (required)
Type: String
Default: ""
Sets the password to be used for the deployment.
tenant (optional)
Type: String
Default: ""
Sets the tenant name to be used for the deployment. Example: https://<tenant>
.sharepoint.com
Important: You have to specify this property or the absoluteUrl property
site (optional)
Type: String
Default: ""
Specify the relative path to the app catalog site. Example: "sites/catalog"
Important: You have to specify this property or the absoluteUrl property
absoluteUrl (optional)
Type: String
Default: ""
Sets the absoluteUrl to the app catalog site that needs to be used for the deployment. Example: https://tenant.sharepoint.com/sites/catalog
.
Important: You have to specify this property or the combination tenant and site property.
filename (required)
Type: String
Default: ""
The name of the package that needs to be deployed.
skipFeatureDeployment (optional)
Type: Boolean
Default: true
Specify if you want to skip feature deployment. When set to true, your customizations will be tenant-scoped.
More information about the skipFeatureDeployment option can be found here: Tenant-Scoped solution deployment for SharePoint Framework solutions.
sp2016 (optional)
Type: Boolean
Default: false
Specify if this is SP2016 on-prem.
verbose (optional)
Type: Boolean
Default: false
Specify if you want to show the console logs.
Where can this be used?
This dependency can for example be used in your SharePoint Framework release process. Here is a sample gulp task that you can add to your SPFx project:
const sppkgDeploy = ; const environmentInfo = "username": "" "password": "" "tenant": "" "catalogSite": "" build;
Once this task is in place, you can run it with: gulp sppkg-deploy
or gulp sppkg-deploy --username "" --password "" --tenant "" --catalogsite ""
.
More information about using arguments in SPFx gulp tasks can be found here: Passing arguments with custom Gulp tasks for SharePoint Framework projects.
Output of the task: