From 973e82187afee24a52b195e178f6e70a7b90ff92 Mon Sep 17 00:00:00 2001 From: David Knise Date: Mon, 4 Apr 2022 13:08:40 -0700 Subject: [PATCH] v1.4.0 - upgrade the msdo-actions-toolkit for shared agent packages (#16) * Upgrade to v1.4.2 of the msdo-actions-toolkit --- node_modules/.package-lock.json | 8 +++---- .../msdo-client.js | 1 + .../msdo-installer.js | 23 ++++++++++++------- .../package.json | 2 +- package-lock.json | 18 +++++++-------- package.json | 4 ++-- 6 files changed, 32 insertions(+), 24 deletions(-) diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index dd541320..42f5341c 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "microsoft-security-devops-action", - "version": "1.3.4", + "version": "1.4.0", "lockfileVersion": 2, "requires": true, "packages": { @@ -26,9 +26,9 @@ "license": "MIT" }, "node_modules/microsoft-security-devops-actions-toolkit": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/microsoft-security-devops-actions-toolkit/-/microsoft-security-devops-actions-toolkit-1.3.1.tgz", - "integrity": "sha512-nbU2nhO+/1zuIgBVJ78ZQmEZmXc0rJVyecgSjkJS8EHwjPze7pHcz+QsIECsko4Aq+v3BgJjpScosKDyD0+Trw==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/microsoft-security-devops-actions-toolkit/-/microsoft-security-devops-actions-toolkit-1.4.2.tgz", + "integrity": "sha512-ynhLFiJ5VKGhKIW4i5mIF9hb1aqnmzS7+EqC6aTkignz8B5WAuttZRl9DIq9uAy3bqU5aj9pSVBvlCDiHNZrbw==", "dependencies": { "@actions/core": "1.2.6", "@actions/exec": "1.0.4" diff --git a/node_modules/microsoft-security-devops-actions-toolkit/msdo-client.js b/node_modules/microsoft-security-devops-actions-toolkit/msdo-client.js index 6f43b657..dccbcb56 100644 --- a/node_modules/microsoft-security-devops-actions-toolkit/msdo-client.js +++ b/node_modules/microsoft-security-devops-actions-toolkit/msdo-client.js @@ -47,6 +47,7 @@ class MsdoClient { let msdoInstaller = new msdo_installer_1.MsdoInstaller(); yield msdoInstaller.install(cliVersion); } + process.env.GDN_SETTINGS_FOLDERS = `Install=${process.env.MSDO_PACKAGES_DIRECTORY}`; console.log('------------------------------------------------------------------------------'); }); } diff --git a/node_modules/microsoft-security-devops-actions-toolkit/msdo-installer.js b/node_modules/microsoft-security-devops-actions-toolkit/msdo-installer.js index 22569f3f..31131541 100644 --- a/node_modules/microsoft-security-devops-actions-toolkit/msdo-installer.js +++ b/node_modules/microsoft-security-devops-actions-toolkit/msdo-installer.js @@ -49,13 +49,20 @@ class MsdoInstaller { process.env.MSDO_FILEPATH = msdoFilePath; return; } - let msdoDirectory = path.resolve(path.join(process.env.GITHUB_WORKSPACE, '../../_msdo')); - core.debug(`msdoDirectory = ${msdoDirectory}`); - this.ensureDirectory(msdoDirectory); - let msdoPackagesDirectory = path.join(msdoDirectory, 'versions'); - core.debug(`msdoPackagesDirectory = ${msdoPackagesDirectory}`); - this.ensureDirectory(msdoPackagesDirectory); - let msdoVersionsDirectory = path.join(msdoPackagesDirectory, 'microsoft.security.devops.cli'); + let agentDirectory = path.resolve(path.join(process.env.GITHUB_WORKSPACE, '../../_msdo')); + core.debug(`agentDirectory = ${agentDirectory}`); + this.ensureDirectory(agentDirectory); + let agentPackagesDirectory = process.env.MSDO_PACKAGES_DIRECTORY; + if (!agentPackagesDirectory) { + agentPackagesDirectory = path.join(agentDirectory, 'packages'); + core.debug(`agentPackagesDirectory = ${agentPackagesDirectory}`); + this.ensureDirectory(agentPackagesDirectory); + process.env.MSDO_PACKAGES_DIRECTORY = agentPackagesDirectory; + } + let agentVersionsDirectory = path.join(agentDirectory, 'versions'); + core.debug(`agentVersionsDirectory = ${agentVersionsDirectory}`); + this.ensureDirectory(agentVersionsDirectory); + let msdoVersionsDirectory = path.join(agentVersionsDirectory, 'microsoft.security.devops.cli'); core.debug(`msdoVersionsDirectory = ${msdoVersionsDirectory}`); if (this.isInstalled(msdoVersionsDirectory, cliVersion)) { return; @@ -74,7 +81,7 @@ class MsdoInstaller { msdoProjectFile, `/p:MsdoPackageVersion=${cliVersion}`, '--packages', - msdoPackagesDirectory, + agentVersionsDirectory, '--source', 'https://api.nuget.org/v3/index.json' ]; diff --git a/node_modules/microsoft-security-devops-actions-toolkit/package.json b/node_modules/microsoft-security-devops-actions-toolkit/package.json index 3685f227..01956358 100644 --- a/node_modules/microsoft-security-devops-actions-toolkit/package.json +++ b/node_modules/microsoft-security-devops-actions-toolkit/package.json @@ -1,6 +1,6 @@ { "name": "microsoft-security-devops-actions-toolkit", - "version": "1.3.1", + "version": "1.4.2", "description": "Microsoft Security DevOps for GitHub Actions toolkit.", "author": "Microsoft Corporation", "license": "MIT", diff --git a/package-lock.json b/package-lock.json index 588eb80c..d38c3369 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "microsoft-security-devops-action", - "version": "1.3.4", + "version": "1.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "microsoft-security-devops-action", - "version": "1.3.3", + "version": "1.4.0", "dependencies": { "@actions/core": "1.2.6", "@actions/exec": "1.0.4", - "microsoft-security-devops-actions-toolkit": "1.3.1" + "microsoft-security-devops-actions-toolkit": "1.4.2" }, "devDependencies": { "@types/mocha": "^2.2.44", @@ -172,9 +172,9 @@ "license": "BSD-3-Clause" }, "node_modules/microsoft-security-devops-actions-toolkit": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/microsoft-security-devops-actions-toolkit/-/microsoft-security-devops-actions-toolkit-1.3.1.tgz", - "integrity": "sha512-nbU2nhO+/1zuIgBVJ78ZQmEZmXc0rJVyecgSjkJS8EHwjPze7pHcz+QsIECsko4Aq+v3BgJjpScosKDyD0+Trw==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/microsoft-security-devops-actions-toolkit/-/microsoft-security-devops-actions-toolkit-1.4.2.tgz", + "integrity": "sha512-ynhLFiJ5VKGhKIW4i5mIF9hb1aqnmzS7+EqC6aTkignz8B5WAuttZRl9DIq9uAy3bqU5aj9pSVBvlCDiHNZrbw==", "dependencies": { "@actions/core": "1.2.6", "@actions/exec": "1.0.4" @@ -414,9 +414,9 @@ "dev": true }, "microsoft-security-devops-actions-toolkit": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/microsoft-security-devops-actions-toolkit/-/microsoft-security-devops-actions-toolkit-1.3.1.tgz", - "integrity": "sha512-nbU2nhO+/1zuIgBVJ78ZQmEZmXc0rJVyecgSjkJS8EHwjPze7pHcz+QsIECsko4Aq+v3BgJjpScosKDyD0+Trw==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/microsoft-security-devops-actions-toolkit/-/microsoft-security-devops-actions-toolkit-1.4.2.tgz", + "integrity": "sha512-ynhLFiJ5VKGhKIW4i5mIF9hb1aqnmzS7+EqC6aTkignz8B5WAuttZRl9DIq9uAy3bqU5aj9pSVBvlCDiHNZrbw==", "requires": { "@actions/core": "1.2.6", "@actions/exec": "1.0.4" diff --git a/package.json b/package.json index 96f13486..f4f4d9c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "microsoft-security-devops-action", - "version": "1.3.4", + "version": "1.4.0", "description": "Node dependencies for the microsoft/security-devops-action.", "scripts": { "test": "mocha" @@ -10,7 +10,7 @@ "dependencies": { "@actions/core": "1.2.6", "@actions/exec": "1.0.4", - "microsoft-security-devops-actions-toolkit": "1.3.1" + "microsoft-security-devops-actions-toolkit": "1.4.2" }, "devDependencies": { "@types/mocha": "^2.2.44",