From 64f6b94e2cc0376209233da57eb772d07972aff6 Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Tue, 12 Dec 2023 09:22:39 -0700 Subject: [PATCH 1/2] remove logs: --- .evergreen.yml | 19 ++++- package-lock.json | 109 +++++++++++++++++++++++++-- packages/build/package.json | 5 +- packages/build/src/run-draft.spec.ts | 32 ++++++-- packages/build/src/run-draft.ts | 30 +++++--- 5 files changed, 168 insertions(+), 27 deletions(-) diff --git a/.evergreen.yml b/.evergreen.yml index 720d90dfc..e36d9f60b 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -6841,6 +6841,8 @@ functions: export NODE_JS_VERSION=${node_js_version} source .evergreen/setup-env.sh export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" + export EVERGREEN_EXPANSIONS_PATH="$(cd ../tmp && pwd)/expansions.yaml" + echo "expansions: $EVERGREEN_EXPANSIONS_PATH" npm run evergreen-release draft } @@ -12954,6 +12956,20 @@ tasks: - func: release_draft vars: node_js_version: "20.9.0" + - name: release_draft_garasign + depends_on: + - name: compile_ts + variant: "*" + # - name: ".smoke-test" + # variant: "*" + commands: + - func: checkout + - func: install + vars: + node_js_version: "20.9.0" + - func: release_draft + vars: + node_js_version: "20.9.0" - name: release_publish_dry_run git_tag_only: true exec_timeout_secs: 86400 @@ -13894,7 +13910,8 @@ buildvariants: display_name: "Draft/Publish Release" run_on: ubuntu2004-small tasks: - - name: release_draft + - name: release_draft + - name: release_draft_garasign - name: release_publish_dry_run - name: release_publish diff --git a/package-lock.json b/package-lock.json index 2acfcdf5a..28ba9ac81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7589,6 +7589,15 @@ "node": ">=8" } }, + "node_modules/@mongodb-js/signing-utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@mongodb-js/signing-utils/-/signing-utils-0.2.1.tgz", + "integrity": "sha512-+Yr7tLwkuUj4kpA27Wwr2LGpBGqBASnjEu0wx4vKQOUkKh5TUkHPTunPaQSG2j2CX0UAsqO4FLu+ojYeThYF1A==", + "dependencies": { + "debug": "^4.3.4", + "ssh2": "^1.15.0" + } + }, "node_modules/@mongodb-js/tsconfig-mongosh": { "resolved": "configs/tsconfig-mongosh", "link": true @@ -11566,7 +11575,6 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, "dependencies": { "safer-buffer": "~2.1.0" } @@ -11937,7 +11945,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, "dependencies": { "tweetnacl": "^0.14.3" } @@ -12329,6 +12336,15 @@ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, + "node_modules/buildcheck": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.6.tgz", + "integrity": "sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==", + "optional": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -13475,6 +13491,20 @@ "node": ">=10" } }, + "node_modules/cpu-features": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz", + "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "buildcheck": "~0.0.6", + "nan": "^2.17.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", @@ -23050,6 +23080,12 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "optional": true }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "optional": true + }, "node_modules/nanoassert": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", @@ -28116,6 +28152,23 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "devOptional": true }, + "node_modules/ssh2": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz", + "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==", + "hasInstallScript": true, + "dependencies": { + "asn1": "^0.2.6", + "bcrypt-pbkdf": "^1.0.2" + }, + "engines": { + "node": ">=10.16.0" + }, + "optionalDependencies": { + "cpu-features": "~0.0.9", + "nan": "^2.18.0" + } + }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -29195,8 +29248,7 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" }, "node_modules/type-check": { "version": "0.4.0", @@ -31041,6 +31093,7 @@ "@mongodb-js/devtools-github-repo": "^1.0.1", "@mongodb-js/dl-center": "^1.1.1", "@mongodb-js/mongodb-downloader": "^0.2.7", + "@mongodb-js/signing-utils": "^0.2.1", "@octokit/rest": "^17.9.0", "aws-sdk": "^2.674.0", "boxednode": "^2.3.0", @@ -37747,6 +37800,15 @@ } } }, + "@mongodb-js/signing-utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@mongodb-js/signing-utils/-/signing-utils-0.2.1.tgz", + "integrity": "sha512-+Yr7tLwkuUj4kpA27Wwr2LGpBGqBASnjEu0wx4vKQOUkKh5TUkHPTunPaQSG2j2CX0UAsqO4FLu+ojYeThYF1A==", + "requires": { + "debug": "^4.3.4", + "ssh2": "^1.15.0" + } + }, "@mongodb-js/tsconfig-mongosh": { "version": "file:configs/tsconfig-mongosh", "requires": { @@ -37962,6 +38024,7 @@ "@mongodb-js/mongodb-downloader": "^0.2.7", "@mongodb-js/monorepo-tools": "^1.1.10", "@mongodb-js/prettier-config-devtools": "^1.0.1", + "@mongodb-js/signing-utils": "^0.2.1", "@mongodb-js/tsconfig-mongosh": "^1.0.0", "@octokit/rest": "^17.9.0", "@types/command-exists": "^1.2.0", @@ -41519,7 +41582,6 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, "requires": { "safer-buffer": "~2.1.0" } @@ -41814,7 +41876,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -42147,6 +42208,12 @@ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, + "buildcheck": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.6.tgz", + "integrity": "sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==", + "optional": true + }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -43041,6 +43108,16 @@ "yaml": "^1.10.0" } }, + "cpu-features": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz", + "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==", + "optional": true, + "requires": { + "buildcheck": "~0.0.6", + "nan": "^2.17.0" + } + }, "create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", @@ -50398,6 +50475,12 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "optional": true }, + "nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "optional": true + }, "nanoassert": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", @@ -54330,6 +54413,17 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "devOptional": true }, + "ssh2": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz", + "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==", + "requires": { + "asn1": "^0.2.6", + "bcrypt-pbkdf": "^1.0.2", + "cpu-features": "~0.0.9", + "nan": "^2.18.0" + } + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -55161,8 +55255,7 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" }, "type-check": { "version": "0.4.0", diff --git a/packages/build/package.json b/packages/build/package.json index b1dd73848..52ec67151 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -40,9 +40,9 @@ }, "devDependencies": { "@mongodb-js/eslint-config-mongosh": "^1.0.0", + "@mongodb-js/monorepo-tools": "^1.1.10", "@mongodb-js/prettier-config-devtools": "^1.0.1", "@mongodb-js/tsconfig-mongosh": "^1.0.0", - "@mongodb-js/monorepo-tools": "^1.1.10", "@types/command-exists": "^1.2.0", "@types/cross-spawn": "^6.0.2", "@types/download": "^8.0.1", @@ -61,8 +61,9 @@ }, "dependencies": { "@mongodb-js/devtools-github-repo": "^1.0.1", - "@mongodb-js/mongodb-downloader": "^0.2.7", "@mongodb-js/dl-center": "^1.1.1", + "@mongodb-js/mongodb-downloader": "^0.2.7", + "@mongodb-js/signing-utils": "^0.2.1", "@octokit/rest": "^17.9.0", "aws-sdk": "^2.674.0", "boxednode": "^2.3.0", diff --git a/packages/build/src/run-draft.spec.ts b/packages/build/src/run-draft.spec.ts index 485d79c9e..1a5a09049 100644 --- a/packages/build/src/run-draft.spec.ts +++ b/packages/build/src/run-draft.spec.ts @@ -22,12 +22,13 @@ function createStubRepo(overrides?: any): GithubRepo { ) as unknown as GithubRepo; } -describe('draft', function () { +describe.only('draft', function () { let config: Config; let githubRepo: GithubRepo; let uploadArtifactToDownloadCenter: typeof uploadArtifactToDownloadCenterFn; let downloadArtifactFromEvergreen: typeof downloadArtifactFromEvergreenFn; let notarizeArtifact: typeof notarizeArtifactFn; + let sign: sinon.SinonSpy; beforeEach(function () { config = { ...dummyConfig }; @@ -37,6 +38,11 @@ describe('draft', function () { Promise.resolve('filename') ); notarizeArtifact = sinon.spy(); + sign = sinon.spy(); + }); + + afterEach(function () { + sinon.restore(); }); describe('runDraft', function () { @@ -62,7 +68,8 @@ describe('draft', function () { uploadArtifactToDownloadCenter, downloadArtifactFromEvergreen, ensureGithubReleaseExistsAndUpdateChangelog, - notarizeArtifact + notarizeArtifact, + sign ); }); @@ -81,11 +88,24 @@ describe('draft', function () { ALL_PACKAGE_VARIANTS.length ); }); + context('when USE_GARASIGN is not set in the environment', function () { + it('asks the notary service to sign files', function () { + expect(notarizeArtifact).to.have.been.callCount( + ALL_PACKAGE_VARIANTS.length + ); + }); + }); - it('asks the notary service to sign files', function () { - expect(notarizeArtifact).to.have.been.callCount( - ALL_PACKAGE_VARIANTS.length - ); + context('when USE_GARASIGN is set in the environment', function () { + before(function () { + process.env.USE_GARASIGN = 'true'; + }); + after(function () { + delete process.env['USE_GARASIGN']; + }); + it('downloads existing artifacts from evergreen', function () { + expect(sign).to.have.been.callCount(ALL_PACKAGE_VARIANTS.length); + }); }); it('uploads artifacts to download center', function () { diff --git a/packages/build/src/run-draft.ts b/packages/build/src/run-draft.ts index 25fdebd95..ff0af7ca5 100644 --- a/packages/build/src/run-draft.ts +++ b/packages/build/src/run-draft.ts @@ -8,6 +8,7 @@ import { notarizeArtifact as notarizeArtifactFn } from './packaging'; import { generateChangelog as generateChangelogFn } from './git'; import type { GithubRepo } from '@mongodb-js/devtools-github-repo'; import { getPackageFile } from './packaging'; +import { sign } from '@mongodb-js/signing-utils'; export async function runDraft( config: Config, @@ -15,8 +16,10 @@ export async function runDraft( uploadToDownloadCenter: typeof uploadArtifactToDownloadCenterFn = uploadArtifactToDownloadCenterFn, downloadArtifactFromEvergreen: typeof downloadArtifactFromEvergreenFn = downloadArtifactFromEvergreenFn, ensureGithubReleaseExistsAndUpdateChangelog: typeof ensureGithubReleaseExistsAndUpdateChangelogFn = ensureGithubReleaseExistsAndUpdateChangelogFn, - notarizeArtifact: typeof notarizeArtifactFn = notarizeArtifactFn + notarizeArtifact: typeof notarizeArtifactFn = notarizeArtifactFn, + garasignSigningFn: typeof sign = sign ): Promise { + process.env['USE_GARASIGN'] = 'true'; if ( !config.triggeringGitTag || !getReleaseVersionFromTag(config.triggeringGitTag) @@ -57,23 +60,30 @@ export async function runDraft( const downloadedArtifact = await downloadArtifactFromEvergreen( tarballFile.path, config.project as string, - config.triggeringGitTag, + config.triggeringGitTag!, tmpDir ); let signatureFile: string | undefined; try { - await notarizeArtifact(downloadedArtifact, { - signingKeyName: config.notarySigningKeyName || '', - authToken: config.notaryAuthToken || '', - signingComment: 'Evergreen Automatic Signing (mongosh)', - }); + if (process.env.USE_GARASIGN === 'true') { + await garasignSigningFn(downloadedArtifact, { + client: 'local', + signingMethod: 'gpg', + }); + } else { + await notarizeArtifact(downloadedArtifact, { + signingKeyName: config.notarySigningKeyName || '', + authToken: config.notaryAuthToken || '', + signingComment: 'Evergreen Automatic Signing (mongosh)', + }); + } signatureFile = downloadedArtifact + '.sig'; await fs.access(signatureFile, fsConstants.R_OK); } catch (err: any) { - console.warn( - `Skipping expected signature file for ${downloadedArtifact}: ${err.message}` - ); + // console.warn( + // `Skipping expected signature file for ${downloadedArtifact}: ${err.message}` + // ); signatureFile = undefined; } From 79916040263e0d12c30731ff274402ed57163955 Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Wed, 17 Jan 2024 11:05:01 -0700 Subject: [PATCH 2/2] fix tests --- package-lock.json | 62 ++++++++++++++++++++++++---- packages/build/package.json | 3 +- packages/build/src/run-draft.spec.ts | 2 +- packages/build/src/run-draft.ts | 1 - 4 files changed, 57 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 28ba9ac81..b6edc6628 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7590,9 +7590,9 @@ } }, "node_modules/@mongodb-js/signing-utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@mongodb-js/signing-utils/-/signing-utils-0.2.1.tgz", - "integrity": "sha512-+Yr7tLwkuUj4kpA27Wwr2LGpBGqBASnjEu0wx4vKQOUkKh5TUkHPTunPaQSG2j2CX0UAsqO4FLu+ojYeThYF1A==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@mongodb-js/signing-utils/-/signing-utils-0.2.3.tgz", + "integrity": "sha512-9JofubOY8B2I9+SoQCkDV3DC4xNU0Vevb6L/7FC3OmLz/5jzrmLkJ5B6VmLOi1nlIV+q0leEopIZUvJZ9BIPrQ==", "dependencies": { "debug": "^4.3.4", "ssh2": "^1.15.0" @@ -10332,6 +10332,22 @@ "@types/node": "*" } }, + "node_modules/@types/ssh2": { + "version": "1.11.18", + "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.11.18.tgz", + "integrity": "sha512-7eH4ppQMFlzvn//zhwD54MWaITR1aSc1oFBye9vb76GZ2Y9PSFYdwVIwOlxRXWs5+1hifntXyt+8a6SUbOD7Hg==", + "dependencies": { + "@types/node": "^18.11.18" + } + }, + "node_modules/@types/ssh2/node_modules/@types/node": { + "version": "18.19.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.8.tgz", + "integrity": "sha512-g1pZtPhsvGVTwmeVoexWZLTQaOvXwoSq//pTL0DHeNzUDrFnir4fgETdhjhIxjVnN+hKOuh98+E1eMLnUXstFg==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, "node_modules/@types/tar": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@types/tar/-/tar-4.0.5.tgz", @@ -29413,6 +29429,11 @@ "ieee754": "^1.1.13" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -31093,8 +31114,9 @@ "@mongodb-js/devtools-github-repo": "^1.0.1", "@mongodb-js/dl-center": "^1.1.1", "@mongodb-js/mongodb-downloader": "^0.2.7", - "@mongodb-js/signing-utils": "^0.2.1", + "@mongodb-js/signing-utils": "^0.2.3", "@octokit/rest": "^17.9.0", + "@types/ssh2": "^1.11.18", "aws-sdk": "^2.674.0", "boxednode": "^2.3.0", "command-exists": "^1.2.9", @@ -37801,9 +37823,9 @@ } }, "@mongodb-js/signing-utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@mongodb-js/signing-utils/-/signing-utils-0.2.1.tgz", - "integrity": "sha512-+Yr7tLwkuUj4kpA27Wwr2LGpBGqBASnjEu0wx4vKQOUkKh5TUkHPTunPaQSG2j2CX0UAsqO4FLu+ojYeThYF1A==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@mongodb-js/signing-utils/-/signing-utils-0.2.3.tgz", + "integrity": "sha512-9JofubOY8B2I9+SoQCkDV3DC4xNU0Vevb6L/7FC3OmLz/5jzrmLkJ5B6VmLOi1nlIV+q0leEopIZUvJZ9BIPrQ==", "requires": { "debug": "^4.3.4", "ssh2": "^1.15.0" @@ -38024,7 +38046,7 @@ "@mongodb-js/mongodb-downloader": "^0.2.7", "@mongodb-js/monorepo-tools": "^1.1.10", "@mongodb-js/prettier-config-devtools": "^1.0.1", - "@mongodb-js/signing-utils": "^0.2.1", + "@mongodb-js/signing-utils": "^0.2.3", "@mongodb-js/tsconfig-mongosh": "^1.0.0", "@octokit/rest": "^17.9.0", "@types/command-exists": "^1.2.0", @@ -38033,6 +38055,7 @@ "@types/es-aggregate-error": "^1.0.2", "@types/node-fetch": "^2.6.4", "@types/rimraf": "^3.0.0", + "@types/ssh2": "^1.11.18", "@types/tar": "^4.0.4", "@types/tar-fs": "^2.0.0", "@types/tmp": "^0.2.3", @@ -40613,6 +40636,24 @@ "@types/node": "*" } }, + "@types/ssh2": { + "version": "1.11.18", + "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.11.18.tgz", + "integrity": "sha512-7eH4ppQMFlzvn//zhwD54MWaITR1aSc1oFBye9vb76GZ2Y9PSFYdwVIwOlxRXWs5+1hifntXyt+8a6SUbOD7Hg==", + "requires": { + "@types/node": "^18.11.18" + }, + "dependencies": { + "@types/node": { + "version": "18.19.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.8.tgz", + "integrity": "sha512-g1pZtPhsvGVTwmeVoexWZLTQaOvXwoSq//pTL0DHeNzUDrFnir4fgETdhjhIxjVnN+hKOuh98+E1eMLnUXstFg==", + "requires": { + "undici-types": "~5.26.4" + } + } + } + }, "@types/tar": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@types/tar/-/tar-4.0.5.tgz", @@ -55361,6 +55402,11 @@ } } }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", diff --git a/packages/build/package.json b/packages/build/package.json index 52ec67151..cdcad1314 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -63,8 +63,9 @@ "@mongodb-js/devtools-github-repo": "^1.0.1", "@mongodb-js/dl-center": "^1.1.1", "@mongodb-js/mongodb-downloader": "^0.2.7", - "@mongodb-js/signing-utils": "^0.2.1", + "@mongodb-js/signing-utils": "^0.2.3", "@octokit/rest": "^17.9.0", + "@types/ssh2": "^1.11.18", "aws-sdk": "^2.674.0", "boxednode": "^2.3.0", "command-exists": "^1.2.9", diff --git a/packages/build/src/run-draft.spec.ts b/packages/build/src/run-draft.spec.ts index 1a5a09049..a732cd9b3 100644 --- a/packages/build/src/run-draft.spec.ts +++ b/packages/build/src/run-draft.spec.ts @@ -22,7 +22,7 @@ function createStubRepo(overrides?: any): GithubRepo { ) as unknown as GithubRepo; } -describe.only('draft', function () { +describe('draft', function () { let config: Config; let githubRepo: GithubRepo; let uploadArtifactToDownloadCenter: typeof uploadArtifactToDownloadCenterFn; diff --git a/packages/build/src/run-draft.ts b/packages/build/src/run-draft.ts index ff0af7ca5..19f964c5a 100644 --- a/packages/build/src/run-draft.ts +++ b/packages/build/src/run-draft.ts @@ -19,7 +19,6 @@ export async function runDraft( notarizeArtifact: typeof notarizeArtifactFn = notarizeArtifactFn, garasignSigningFn: typeof sign = sign ): Promise { - process.env['USE_GARASIGN'] = 'true'; if ( !config.triggeringGitTag || !getReleaseVersionFromTag(config.triggeringGitTag)