-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2123 from epam/feat/improve_e2e_image
Improve e2e.Dockerfile
- Loading branch information
Showing
7 changed files
with
51 additions
and
49 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { readEnvFile } from './envFileUtils'; | ||
import { Logger } from '../src/utils/logger'; | ||
import { CONTAINER_ENGINES, ENV_FILES } from './constants'; | ||
import { isCmdSuccessful } from './cliUtils'; | ||
|
||
export function getContainerEngineCmd(): string { | ||
const envFile = readEnvFile(); | ||
let cmdEffective: string = envFile.UUI_DOCKER_CONTAINER_ENGINE; | ||
if (cmdEffective) { | ||
Logger.info(`The "${cmdEffective}" container engine is explicitly specified in "${ENV_FILES.DOCKER}"; It will be used.`); | ||
return cmdEffective; | ||
} else { | ||
const isPodmanInstalled = isCmdSuccessful({ cmd: CONTAINER_ENGINES.podman, args: ['-v'] }); | ||
if (isPodmanInstalled) { | ||
Logger.info(`The "${CONTAINER_ENGINES.podman}" CLI detected.`); | ||
cmdEffective = CONTAINER_ENGINES.podman; | ||
} else { | ||
// fallback | ||
cmdEffective = CONTAINER_ENGINES.docker; | ||
} | ||
Logger.info(`No container engine is explicitly specified in "${ENV_FILES.DOCKER}"; "${cmdEffective}" will be used.`); | ||
} | ||
return cmdEffective; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters