From 21742c7d73c031ff210cbfb4bd33845bbf5f41b5 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Fri, 8 Oct 2021 18:16:41 +0200 Subject: [PATCH] Updated build script --- .github/workflows/images_build_windows.yml | 12 ++++++++++-- Dockerfiles/build-base/windows/Dockerfile.agent2 | 4 +--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/images_build_windows.yml b/.github/workflows/images_build_windows.yml index 32e073956..304eca6fc 100644 --- a/.github/workflows/images_build_windows.yml +++ b/.github/workflows/images_build_windows.yml @@ -170,17 +170,25 @@ jobs: run: | $tags_array=$( "${{ steps.meta.outputs.tags}}".Split("`r`n") ) $tags=$($tags_array | Foreach-Object { "--tag=$_" }) + $tags_list=$($tags_array -Join ' ') docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + if (-not $?) {throw "Failed"} echo "docker build --file=.\Dockerfiles\build-mysql\windows\Dockerfile.${{ matrix.build }} $tags .\Dockerfiles\build-mysql\windows\" docker build --build-arg=BUILD_BASE_IMAGE=${{ steps.base_build.outputs.base_build_image }} --file=.\Dockerfiles\build-mysql\windows\Dockerfile.${{ matrix.build }} $tags .\Dockerfiles\build-mysql\windows\ + if (-not $?) {throw "Failed"} - echo "docker push image push --all-tags $tags_array[0]" - docker image push --all-tags $tags_array[0] + echo "docker push image push --all-tags $tags_list" + Foreach ($tag in $test2) { + docker image push $tag + if (-not $?) {throw "Failed"} + } docker logout + if (-not $?) {throw "Failed"} $digest=$(docker inspect $tags_array[0] --format "{{.Id}}") + if (-not $?) {throw "Failed"} echo $digest echo "$digest" > base-mysql_${{ matrix.os }}_${{ matrix.build }}) diff --git a/Dockerfiles/build-base/windows/Dockerfile.agent2 b/Dockerfiles/build-base/windows/Dockerfile.agent2 index 5daa27cb6..2045cf900 100644 --- a/Dockerfiles/build-base/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile.agent2 @@ -113,9 +113,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` 7z -h | Select -first 2; ` ` Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); ` - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12; ` - [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }; ` - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12; ` + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` (new-object System.Net.WebClient).DownloadFile("""$env:MINGW_URL""","""$env:SystemDrive\mingw.7z"""); ` ` $sha256 = 'e8c65ddc655534b0330f66f7b480565621e8617cda9937d76ba141a22bf3b2fa'; `