prepare for windows 1903 [ci skip]

This commit is contained in:
Brad Rydzewski 2019-08-04 21:37:08 -07:00
parent 5b0a12bcb3
commit 7eaff99357
2 changed files with 24 additions and 11 deletions

View File

@ -21,7 +21,7 @@ steps:
auto_tag_suffix: linux-amd64
dockerfile: docker/Dockerfile.linux.amd64
password:
$secret: password
from_secret: docker_password
repo: drone/git
username: drone
when:
@ -52,7 +52,7 @@ steps:
auto_tag_suffix: linux-arm64
dockerfile: docker/Dockerfile.linux.arm64
password:
$secret: password
from_secret: docker_password
repo: drone/git
username: drone
when:
@ -83,7 +83,7 @@ steps:
auto_tag_suffix: linux-arm
dockerfile: docker/Dockerfile.linux.arm
password:
$secret: password
from_secret: docker_password
repo: drone/git
username: drone
when:
@ -105,7 +105,7 @@ steps:
settings:
ignore_missing: true
password:
$secret: password
from_secret: docker_password
spec: docker/manifest.tmpl
username: drone
when:
@ -119,11 +119,4 @@ depends_on:
- linux-arm64
- linux-amd64
---
kind: secret
type: external
data:
password: "drone/docker#password"
username: "drone/docker#username"
...

View File

@ -0,0 +1,20 @@
# escape=`
FROM mcr.microsoft.com/windows/servercore:1903 AS git
SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest -UseBasicParsing https://github.com/git-for-windows/git/releases/download/v2.21.0.windows.1/MinGit-2.21.0-64-bit.zip -OutFile git.zip; `
Expand-Archive git.zip -DestinationPath C:\git;
FROM mcr.microsoft.com/powershell:nanoserver-1903
COPY --from=git /git /git
ADD windows/* /bin/
# https://github.com/PowerShell/PowerShell/issues/6211#issuecomment-367477137
USER ContainerAdministrator
RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
CMD [ "pwsh", "C:\\bin\\clone.ps1" ]