1
0
Fork 0

simplify build script for win

This commit is contained in:
Mikhail Goncharov 2023-10-30 10:18:27 +00:00
parent 6b10a5d09b
commit 57988f5329

View file

@ -20,15 +20,7 @@ param(
$ROOT_DIR=(Get-Item $PSScriptRoot).Parent.FullName $ROOT_DIR=(Get-Item $PSScriptRoot).Parent.FullName
. ${ROOT_DIR}\scripts\common.ps1 . ${ROOT_DIR}\scripts\common.ps1
# get config options $QUALIFIED_NAME="gcr.io/llvm-premerge-checks/${IMAGE_NAME}"
Get-Content "${ROOT_DIR}\k8s_config" | Foreach-Object{
if (! $_.StartsWith('#') ){
$var = $_.Split('=')
New-Variable -Name $var[0] -Value $var[1]
}
}
$QUALIFIED_NAME="${GCR_HOSTNAME}/${GCP_PROJECT}/${IMAGE_NAME}"
Push-Location "$PSScriptRoot\$IMAGE_NAME" Push-Location "$PSScriptRoot\$IMAGE_NAME"
@ -36,7 +28,7 @@ Write-Host "Building ${IMAGE_NAME}..."
Invoke-Call -ScriptBlock { Invoke-Call -ScriptBlock {
docker build . -t ${IMAGE_NAME}:latest docker build . -t ${IMAGE_NAME}:latest
} }
Invoke-Call -ScriptBlock { Invoke-Call -ScriptBlock {
docker tag ${IMAGE_NAME}:latest ${QUALIFIED_NAME}:latest docker tag ${IMAGE_NAME}:latest ${QUALIFIED_NAME}:latest
} }