Deploying Local Files Using Gulp in SuiteCommerce

Deploy local files to NetSuite using Gulp commands for SuiteCommerce applications, simplifying the process and enhancing efficiency.

·3 min read·View Oracle Docs

TL;DR Opening: This article outlines how to deploy local files to your NetSuite file cabinet using Gulp commands in SuiteCommerce applications. Understanding this process is crucial for maintaining efficient development workflows and ensuring your applications are up to date.

How Do You Deploy Local Files?

After creating your SSP (SuiteScript 1.0) application, you can utilize the SuiteCommerce Advanced (SCA) developer tools to deploy local files directly to your NetSuite file cabinet. To complete this deployment effectively, ensure you have the following information:

  • Authentication ID: Required for connecting to NetSuite.
  • SSP Application Record Details: This includes HTML Hosting Root, Application Publisher, and Application Name that were set during the creation of your SSP application.

How to Deploy Local Files Using Gulp

  1. Open Command Line: Return to your command line or terminal window.

  2. Navigate to SCA Source Directory: From the SCA source directory (where the package.json file is located), enter the command:

    gulp deploy

    If this is your first deployment, the command will create deployment directories as needed based on your implementation.

    Note: If you have previously set an authentication ID, the developer tools will use that for subsequent deploys. To use a different ID, include the --to parameter.

  3. Select Account and Role: In NetSuite, choose the account you wish to deploy to, select the appropriate role, and click the Allow button. This action generates the authentication token and secret for the deployment. Ensure that the selected role has the necessary permissions, typically granted to the Administrator and SCDeployer roles.

  4. Input SSP Application Details: You'll need to provide details from your SSP application record:

    • Hosting Files Folder: Corresponds to the HTML Hosting Root.
    • Application Publisher: The publisher of your SSP application.
    • SSP Application: The name of your SSP application.

Once all connection settings are entered, the files from your local system will be pushed to the NetSuite file cabinet, which may take several minutes. Wait for the deployment process to complete before continuing.

Note: On the first run of gulp deploy, connection settings are saved in the .nsdeploy file located in your source directory. For subsequent deployments, credentials are not required. If changing the SSP application, you can manually edit the .nsdeploy file. Additionally, the first deployment generates a manifest file within the NetSuite file cabinet tracking the uploaded files and their content hashes, allowing future deployments to update only changed or new files.

Who This Affects

  • Developers utilizing SuiteCommerce for building applications.
  • Administrators responsible for managing SCA environments and file deployments.
  • Users requiring knowledge of authentication processes with SCA tools.

Key Takeaways

  • Deploying local files in SuiteCommerce is streamlined using Gulp commands.
  • Proper role permissions are essential for successful deployment to NetSuite.
  • The .nsdeploy file facilitates easier subsequent deployments by storing connection settings.
  • The initial deployment generates a manifest file to track changes in uploaded files.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

What permissions are required for deploying files using Gulp in SuiteCommerce?
The role selected for deployment must have the necessary permissions, typically the Administrator and SCDeployer roles are required for deploying files using Gulp in SuiteCommerce.
Do I need to configure authentication every time I deploy local files to NetSuite using Gulp?
No, once you perform an initial deployment with the `gulp deploy` command, connection settings are saved in the `.nsdeploy` file. For subsequent deployments, credentials are not required unless you're changing the SSP application.
What steps are necessary to change the authentication ID for subsequent Gulp deployments?
To use a different authentication ID for subsequent deployments, include the `--to` parameter with the `gulp deploy` command to specify the new credentials.
Does the first deployment of local files to NetSuite require any special actions?
Yes, during the first deployment, Gulp creates necessary deployment directories, generates a manifest file tracking uploaded files and their content hashes, and saves connection settings in the `.nsdeploy` file for easier subsequent deployments.
Source: Step 2: Deploy Local Files Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in SuiteCloud Development Framework

View all SuiteCloud Development Framework articles →