File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
src/Pages/GlobalConfigurations/BuildInfra Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -247,3 +247,5 @@ export const DEFAULT_TOLERANCE_OPERATOR = BuildInfraToleranceOperatorType.EQUALS
247
247
export const INFRA_CONFIG_NOT_SUPPORTED_BY_BUILD_X : Partial < Record < BuildInfraConfigTypes , true > > = {
248
248
[ BuildInfraConfigTypes . BUILD_TIMEOUT ] : true ,
249
249
}
250
+
251
+ export const USE_BUILD_X_DRIVER_FALLBACK = true
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import {
43
43
BUILD_INFRA_DEFAULT_PLATFORM_NAME ,
44
44
BUILD_INFRA_LATEST_API_VERSION ,
45
45
INFRA_CONFIG_NOT_SUPPORTED_BY_BUILD_X ,
46
+ USE_BUILD_X_DRIVER_FALLBACK ,
46
47
} from './constants'
47
48
import { getUniqueId } from '../../../Shared'
48
49
@@ -108,14 +109,20 @@ export const parsePlatformConfigIntoValue = (
108
109
}
109
110
}
110
111
112
+ export const getParsedValueForUseK8sDriver = ( buildxDriverType : BuildXDriverType ) : boolean => {
113
+ if ( ! buildxDriverType ) {
114
+ return USE_BUILD_X_DRIVER_FALLBACK
115
+ }
116
+
117
+ return buildxDriverType === BuildXDriverType . KUBERNETES
118
+ }
119
+
111
120
const getBaseProfileObject = ( {
112
121
fromCreateView,
113
122
profile,
114
123
canConfigureUseK8sDriver,
115
124
} : GetBaseProfileObjectParamsType ) : BuildInfraProfileBase => {
116
- const parsedUseK8sDriverValue = profile ?. buildxDriverType
117
- ? profile . buildxDriverType === BuildXDriverType . KUBERNETES
118
- : true
125
+ const parsedUseK8sDriverValue = getParsedValueForUseK8sDriver ( profile ?. buildxDriverType )
119
126
const useK8sDriver = canConfigureUseK8sDriver ? parsedUseK8sDriverValue : null
120
127
121
128
if ( fromCreateView || ! profile ) {
You can’t perform that action at this time.
0 commit comments