File tree 3 files changed +28
-15
lines changed
3 files changed +28
-15
lines changed Original file line number Diff line number Diff line change 14
14
ARTIFACTORY_DEPLOY_REPO : sonarsource-public-qa
15
15
NPM_CONFIG_registry : https://repox.jfrog.io/artifactory/api/npm/npm
16
16
NPM_CONFIG_//repox.jfrog.io/artifactory/api/npm/:_authToken : VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader access_token]
17
+ SENTRY_UPLOAD_TOKEN : VAULT[development/kv/data/sentry/sq-ide-upload data.token]
17
18
18
19
ARTIFACTORY_PRIVATE_READER_USERNAME : $ARTIFACTORY_PRIVATE_USERNAME
19
20
ARTIFACTORY_PRIVATE_READER_PASSWORD : $ARTIFACTORY_PRIVATE_PASSWORD
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { getPackageJSON } from './fsUtils.mjs';
10
10
import { join , extname , basename } from 'path' ;
11
11
import dateformat from 'dateformat' ;
12
12
import { computeDependencyHashes , fileHashsum } from './hashes.mjs' ;
13
- import jarDependencies from '../scripts/dependencies.json' assert { type : "json " } ;
13
+ import jarDependencies from '../scripts/dependencies.json' with { type : "json" } ;
14
14
import { createReadStream } from 'fs' ;
15
15
import fetch , { Headers } from 'node-fetch' ;
16
16
import { globbySync } from 'globby' ;
Original file line number Diff line number Diff line change 10
10
11
11
const path = require ( 'path' ) ;
12
12
13
- const plugins = [ ] ;
14
- // Must be injected by CI environment
15
- if ( process . env . SENTRY_UPLOAD_TOKEN ) {
16
- /**@type {import('webpack').WebpackPluginFunction }*/
17
- const { sentryWebpackPlugin } = require ( '@sentry/webpack-plugin' ) ;
18
- plugins . push ( sentryWebpackPlugin ( {
19
- org : 'sonar-x0' ,
20
- project : 'sonarqube-vscode' ,
21
- authToken : process . env . SENTRY_UPLOAD_TOKEN
22
- } ) ) ;
23
- }
24
-
25
13
/**@type {import('webpack').Configuration }*/
26
14
const config = {
27
15
// vscode extensions run in a Node.js-context -> https://webpack.js.org/configuration/node/
@@ -59,6 +47,30 @@ const config = {
59
47
}
60
48
]
61
49
} ,
62
- plugins
50
+ plugins : [ ]
63
51
} ;
64
- module . exports = config ;
52
+
53
+ module . exports = ( env , argv ) => {
54
+
55
+ if (
56
+ // Injected by Vault
57
+ env . SENTRY_UPLOAD_TOKEN &&
58
+ // Injected by CI
59
+ env . BUILD_NUMBER
60
+ ) {
61
+ /**@type {import('webpack').WebpackPluginFunction }*/
62
+ const { sentryWebpackPlugin } = require ( '@sentry/webpack-plugin' ) ;
63
+ const { version } = require ( './package.json' ) ;
64
+
65
+ config . plugins . push ( sentryWebpackPlugin ( {
66
+ org : 'sonar-x0' ,
67
+ project : 'sonarqube-vscode' ,
68
+ authToken : process . env . SENTRY_UPLOAD_TOKEN ,
69
+ release : {
70
+ name : version
71
+ }
72
+ } ) ) ;
73
+ }
74
+
75
+ return config ;
76
+ }
You can’t perform that action at this time.
0 commit comments