File tree Expand file tree Collapse file tree 3 files changed +60
-1
lines changed Expand file tree Collapse file tree 3 files changed +60
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,38 @@ trigger:
131
131
event :
132
132
- push
133
133
134
+ ---
135
+ kind : pipeline
136
+ type : ssh
137
+ name : windows-2004-amd64
138
+
139
+ platform :
140
+ os : windows
141
+
142
+ server :
143
+ host :
144
+ from_secret : windows_server_2004
145
+ password :
146
+ from_secret : windows_password
147
+ user :
148
+ from_secret : windows_username
149
+
150
+ steps :
151
+ - name : build
152
+ commands :
153
+ - docker login -u $env:USERNAME -p $env:PASSWORD
154
+ - docker build -f docker/Dockerfile.windows.2004 -t drone/git:windows-2004-amd64 .
155
+ - docker push drone/git:windows-2004-amd64
156
+ environment :
157
+ USERNAME :
158
+ from_secret : docker_username
159
+ PASSWORD :
160
+ from_secret : docker_password
161
+
162
+ trigger :
163
+ event :
164
+ - push
165
+
134
166
---
135
167
kind : pipeline
136
168
type : ssh
@@ -221,6 +253,7 @@ depends_on:
221
253
- linux-amd64
222
254
- linux-arm64
223
255
- linux-arm
256
+ - windows-2004-amd64
224
257
- windows-1909-amd64
225
258
- windows-1903-amd64
226
259
- windows-1809-amd64
Original file line number Diff line number Diff line change
1
+ # escape=`
2
+
3
+ FROM mcr.microsoft.com/windows/servercore:2004 AS git
4
+ SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
5
+
6
+ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
7
+ 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; `
8
+ Expand-Archive git.zip -DestinationPath C:\git;
9
+
10
+ FROM mcr.microsoft.com/powershell:nanoserver-2004
11
+ COPY --from=git /git /git
12
+
13
+ ADD windows/* /bin/
14
+
15
+ # https://github.com/PowerShell/PowerShell/issues/6211#issuecomment-367477137
16
+ USER ContainerAdministrator
17
+ RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
18
+
19
+ SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
20
+ CMD [ "pwsh", "C:\\bin\\clone.ps1" ]
Original file line number Diff line number Diff line change @@ -52,4 +52,10 @@ manifests:
52
52
platform:
53
53
architecture: amd64
54
54
os: windows
55
- version: 1909
55
+ version: 1909
56
+ -
57
+ image: drone/git:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-2004-amd64
58
+ platform:
59
+ architecture: amd64
60
+ os: windows
61
+ version: 2004
You can’t perform that action at this time.
0 commit comments