Trying to cache npm salesforce installs between builds on Azure Devops pipeline

Hari Gopal A 1 Reputation point
2022-09-06T17:11:38.94+00:00

Trying to cache npm salesforce installs between builds on Azure Devops pipeline
but iam unable to do this i traied to below existing code
setup-dependencies.yml

---------------------------

steps:

  • task: NodeTool@0
    inputs:
    versionSpec: '17.x'
    checkLatest: false
  • bash: ls -d -- */
    displayName: Navigate to directory
  • bash:
    npm install sfdx-cli@latest-rc --location=global
    displayName: Install Salesforce CLI

--------------------------------------------------------------------

in the above code i training to implement cache concept ,
but iam not geting it,please help on this,the below code what iam training to

variables:
npm_config_cache: $(Pipeline.Workspace)/.npm

steps:

  • task: Cache@2
    inputs:
    key: 'npm | "$(Agent.OS)" | package-lock.json'
    restoreKeys: |
    npm | "$(Agent.OS)"
    path: $(npm_config_cache)
    displayName: Cache npm
  • script: npm ci
Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,426 Reputation points Moderator
    2022-09-13T10:17:05.003+00:00

    Hi @Hari Gopal A ,

    Azure DevOps is currently not supported in this Microsoft Q&A platform. These are the products that are currently supported in this Microsoft Q&A platform. You may ask Azure DevOps related questions in this developer community / via this Azure DevOps services support.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.