IPlatform getPlatformImpl()

in src/com/epam/digital/data/platform/pipelines/platform/PlatformFactory.groovy [28:41]


    IPlatform getPlatformImpl(final String customPlatformType = null) {
        String platformType = customPlatformType ?: System.getenv("PLATFORM_TYPE")
        if (!platformType)
            context.script.error("Platform type is not defined and " +
                    "environment variable PLATFORM_TYPE is not defined")
        switch (platformType.toLowerCase()) {
            case PlatformType.OPENSHIFT.value:
                return new Openshift(context)
            case PlatformType.KUBERNETES.value:
                return new Kubernetes(context)
            default:
                context.script.error("Failed to determine platform type")
        }
    }