Step 3: Add npm Repositories and Artifacts

Get Started with the JFrog Platform

Content Type
Administration / Platform
ft:sourceType
Paligo

This step will walk you through creating an npm repository type and uploading your go project, allowing you to use Artifactory as your artifact repository. You can then follow the instructions to create other types of repositories, such as Maven, Go, and Docker.

  1. Navigate to the Administration Module.

  2. Expand the Repositories menu and click the Repositories menu item.

  3. Create three new npm package type repositories.

    1. Add a new Local Repository with the Repository Key “npm-challenge-local” and keep the rest of the default settings.

    2. Click on the Remote tab and add a new Remote Repository with the Repository Key “npm-challenge-remote” and keep the rest of the default settings.

    3. Click on the Virtual tab and add a new Virtual Repository with the Repository Key “npm-challenge”.

      1. Add the local and remote npm repositories you just created.

  4. Configure JFrog CLI, a smart client that provides a simple interface that automates access to JFrog products simplifying our automation scripts.

    1. Configure the Artifactory server.

      $ jf c add
  5. Take the following steps to build the project with npm and resolve the project dependencies from Artifactory.

    1. Configure the project's npm repositories.

      $ jf rt npm-config
    2. Build the project with npm and resolve the project dependencies from Artifactory.

      1. Install the project while resolving the project dependencies from Artifactory.

        $jf rt npm-install --build-name=npm-challenge-build --build-number=1.0.0
      2. Publish the npm Packages into Artifactory

        $ jf rt npm-install --build-name=npm-challenge-build --build-number=1.0.0
      3. Collect environment variables and add them to the build info.

        $ jf rt bce npm-challenge-build 1.0.0
      4. Publish the build-info to Artifactory.

        $ jf rt bp npm-challenge-build 1.0.0
  6. Navigate to the Application Module.

  7. Expand the Artifactory menu and click the Artifacts menu item.

Here you’ll be able to see the details of your new artifacts.

npm artifact.png