@@ -950,38 +950,13 @@ function keyValueAsStringToObject(nodeSelectorStr) {
950950 }
951951}
952952
953- function keyValueArrayToObject ( arr ) {
954- return arr . reduce ( ( acc , cur ) => {
955- const parts = cur . split ( '=' ) ;
956- // eslint-disable-next-line prefer-destructuring
957- acc [ parts [ 0 ] ] = parts [ 1 ] ;
958- return acc ;
959- } , { } ) ;
960- }
961-
962953function objectToKeyValueArray ( obj ) {
963954 return Object . keys ( obj ) . reduce ( ( acc , key ) => {
964955 acc . push ( `${ key } =${ obj [ key ] } ` ) ;
965956 return acc ;
966957 } , [ ] ) ;
967958}
968959
969- function addProxyVariables ( envVars , { httpProxy, httpsProxy, noProxy } ) {
970- const envVarsObj = keyValueArrayToObject ( envVars ) ;
971- if ( httpsProxy && ! envVarsObj . HTTPS_PROXY && ! envVarsObj . https_proxy ) {
972- envVars . push ( `HTTPS_PROXY=${ httpsProxy } ` ) ;
973- envVars . push ( `https_proxy=${ httpsProxy } ` ) ;
974- }
975- if ( httpProxy && ! envVarsObj . HTTP_PROXY && ! envVarsObj . http_proxy ) {
976- envVars . push ( `HTTP_PROXY=${ httpProxy } ` ) ;
977- envVars . push ( `http_proxy=${ httpProxy } ` ) ;
978- }
979- if ( noProxy && ! envVarsObj . NO_PROXY && ! envVarsObj . no_proxy ) {
980- envVars . push ( `NO_PROXY=${ noProxy } ` ) ;
981- envVars . push ( `no_proxy=${ noProxy } ` ) ;
982- }
983- }
984-
985960function serealizeToKeyValuePairs ( obj ) {
986961 return _ . keys ( obj ) . reduce ( ( acc , key ) => {
987962 if ( acc ) {
@@ -991,17 +966,6 @@ function serealizeToKeyValuePairs(obj) {
991966 } , '' ) ;
992967}
993968
994- function detectProxy ( ) {
995- const httpProxy = process . env . http_proxy || process . env . HTTP_PROXY ;
996- const httpsProxy = process . env . https_proxy || process . env . HTTPS_PROXY ;
997- const noProxy = process . env . no_proxy || process . env . NO_PROXY ;
998- return {
999- httpProxy,
1000- httpsProxy,
1001- noProxy,
1002- } ;
1003- }
1004-
1005969function getRuntimeImagesWithRegistryUrl ( registry ) {
1006970 return Object . keys ( RUNTIME_IMAGES ) . reduce ( ( acc , cur ) => {
1007971 acc [ cur ] = `${ registry } /${ RUNTIME_IMAGES [ cur ] } ` ;
@@ -1088,7 +1052,6 @@ module.exports = {
10881052 getRuntimeVersion,
10891053 createTestPipeline,
10901054 getTestPipeline,
1091- addProxyVariables,
10921055 updateTestPipelineRuntime,
10931056 executeTestPipeline,
10941057 createProgressBar,
@@ -1103,14 +1066,12 @@ module.exports = {
11031066 newRuntimeName,
11041067 newAgentName,
11051068 keyValueAsStringToObject,
1106- keyValueArrayToObject,
11071069 objectToKeyValueArray,
11081070 downloadRelatedComponents : downloadHybridComponents ,
11091071 downloadSteveDore,
11101072 downloadVeonona,
11111073 downloadProvider,
11121074 runUpgrade,
1113- detectProxy,
11141075 serealizeToKeyValuePairs,
11151076 getRuntimeImagesWithRegistryUrl,
11161077 installAppProxy,
0 commit comments