@@ -950,38 +950,13 @@ function keyValueAsStringToObject(nodeSelectorStr) {
950
950
}
951
951
}
952
952
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
-
962
953
function objectToKeyValueArray ( obj ) {
963
954
return Object . keys ( obj ) . reduce ( ( acc , key ) => {
964
955
acc . push ( `${ key } =${ obj [ key ] } ` ) ;
965
956
return acc ;
966
957
} , [ ] ) ;
967
958
}
968
959
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
-
985
960
function serealizeToKeyValuePairs ( obj ) {
986
961
return _ . keys ( obj ) . reduce ( ( acc , key ) => {
987
962
if ( acc ) {
@@ -991,17 +966,6 @@ function serealizeToKeyValuePairs(obj) {
991
966
} , '' ) ;
992
967
}
993
968
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
-
1005
969
function getRuntimeImagesWithRegistryUrl ( registry ) {
1006
970
return Object . keys ( RUNTIME_IMAGES ) . reduce ( ( acc , cur ) => {
1007
971
acc [ cur ] = `${ registry } /${ RUNTIME_IMAGES [ cur ] } ` ;
@@ -1088,7 +1052,6 @@ module.exports = {
1088
1052
getRuntimeVersion,
1089
1053
createTestPipeline,
1090
1054
getTestPipeline,
1091
- addProxyVariables,
1092
1055
updateTestPipelineRuntime,
1093
1056
executeTestPipeline,
1094
1057
createProgressBar,
@@ -1103,14 +1066,12 @@ module.exports = {
1103
1066
newRuntimeName,
1104
1067
newAgentName,
1105
1068
keyValueAsStringToObject,
1106
- keyValueArrayToObject,
1107
1069
objectToKeyValueArray,
1108
1070
downloadRelatedComponents : downloadHybridComponents ,
1109
1071
downloadSteveDore,
1110
1072
downloadVeonona,
1111
1073
downloadProvider,
1112
1074
runUpgrade,
1113
- detectProxy,
1114
1075
serealizeToKeyValuePairs,
1115
1076
getRuntimeImagesWithRegistryUrl,
1116
1077
installAppProxy,
0 commit comments