Skip to content

Commit dcdcea6

Browse files
authored
Publish windows images (#82)
1 parent d1e4b32 commit dcdcea6

File tree

7 files changed

+142
-82
lines changed

7 files changed

+142
-82
lines changed

.drone.windows.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

.drone.yml

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,93 @@ trigger:
267267
depends_on:
268268
- testing
269269

270+
---
271+
kind: pipeline
272+
type: ssh
273+
name: windows-1809-amd64
274+
275+
platform:
276+
os: windows
277+
278+
server:
279+
host: windows.1809.amd64.plugins.drone.ci
280+
password:
281+
from_secret: windows_password
282+
user:
283+
from_secret: windows_username
284+
285+
steps:
286+
- name: build
287+
commands:
288+
- go build -o release/windows/amd64/drone-s3.exe
289+
- docker login -u $env:USERNAME -p $env:PASSWORD
290+
- |
291+
if (Test-Path env:DRONE_SEMVER_SHORT) {
292+
docker build -f docker/Dockerfile.windows.1809 -t plugins/s3:$env:DRONE_SEMVER_SHORT-windows-1809-amd64 .
293+
docker push plugins/s3:$env:DRONE_SEMVER_SHORT-windows-1809-amd64
294+
} else {
295+
docker build -f docker/Dockerfile.windows.1809 -t plugins/s3:windows-1809-amd64 .
296+
docker push plugins/s3:windows-1809-amd64
297+
}
298+
environment:
299+
CGO_ENABLED: "0"
300+
USERNAME:
301+
from_secret: docker_username
302+
PASSWORD:
303+
from_secret: docker_password
304+
305+
trigger:
306+
event:
307+
- push
308+
- tag
309+
310+
depends_on:
311+
- testing
312+
313+
---
314+
kind: pipeline
315+
type: ssh
316+
name: windows-1903-amd64
317+
318+
platform:
319+
os: windows
320+
321+
server:
322+
host: windows.1903.amd64.plugins.drone.ci
323+
password:
324+
from_secret: windows_password
325+
user:
326+
from_secret: windows_username
327+
328+
steps:
329+
- name: build
330+
commands:
331+
- echo $env:DRONE_SEMVER_SHORT
332+
- go build -o release/windows/amd64/drone-s3.exe
333+
- docker login -u $env:USERNAME -p $env:PASSWORD
334+
- |
335+
if (Test-Path env:DRONE_SEMVER_SHORT) {
336+
docker build -f docker/Dockerfile.windows.1903 -t plugins/s3:$env:DRONE_SEMVER_SHORT-windows-1903-amd64 .
337+
docker push plugins/s3:$env:DRONE_SEMVER_SHORT-windows-1903-amd64
338+
} else {
339+
docker build -f docker/Dockerfile.windows.1903 -t plugins/s3:windows-1903-amd64 .
340+
docker push plugins/s3:windows-1903-amd64
341+
}
342+
environment:
343+
CGO_ENABLED: "0"
344+
USERNAME:
345+
from_secret: docker_username
346+
PASSWORD:
347+
from_secret: docker_password
348+
349+
trigger:
350+
event:
351+
- push
352+
- tag
353+
354+
depends_on:
355+
- testing
356+
270357
---
271358
kind: pipeline
272359
name: notifications
@@ -305,5 +392,6 @@ depends_on:
305392
- linux-amd64
306393
- linux-arm64
307394
- linux-arm
308-
395+
- windows-1809-amd64
396+
- windows-1903-amd64
309397
...
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# escape=`
2-
FROM plugins/base:windows-amd64
2+
FROM mcr.microsoft.com/windows/nanoserver:1803
3+
USER ContainerAdministrator
4+
5+
ENV GODEBUG=netdns=go
36

47
LABEL maintainer="Drone.IO Community <[email protected]>" `
58
org.label-schema.name="Drone S3" `
69
org.label-schema.vendor="Drone.IO Community" `
710
org.label-schema.schema-version="1.0"
811

9-
ADD release\drone-s3.exe c:\drone-s3.exe
10-
ENTRYPOINT [ "c:\\drone-s3.exe" ]
12+
ADD release/windows/amd64/drone-s3.exe C:/drone-s3.exe
13+
ENTRYPOINT [ "C:\\drone-s3.exe" ]

docker/Dockerfile.windows.1809

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# escape=`
2+
FROM mcr.microsoft.com/windows/nanoserver:1809
3+
USER ContainerAdministrator
4+
5+
ENV GODEBUG=netdns=go
6+
7+
LABEL maintainer="Drone.IO Community <[email protected]>" `
8+
org.label-schema.name="Drone S3" `
9+
org.label-schema.vendor="Drone.IO Community" `
10+
org.label-schema.schema-version="1.0"
11+
12+
ADD release/windows/amd64/drone-s3.exe C:/drone-s3.exe
13+
ENTRYPOINT [ "C:\\drone-s3.exe" ]

docker/Dockerfile.windows.1903

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# escape=`
2+
FROM mcr.microsoft.com/windows/nanoserver:1903
3+
USER ContainerAdministrator
4+
5+
ENV GODEBUG=netdns=go
6+
7+
LABEL maintainer="Drone.IO Community <[email protected]>" `
8+
org.label-schema.name="Drone S3" `
9+
org.label-schema.vendor="Drone.IO Community" `
10+
org.label-schema.schema-version="1.0"
11+
12+
ADD release/windows/amd64/drone-s3.exe C:/drone-s3.exe
13+
ENTRYPOINT [ "C:\\drone-s3.exe" ]

docker/Dockerfile.windows.1909

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# escape=`
2+
FROM mcr.microsoft.com/windows/nanoserver:1909
3+
USER ContainerAdministrator
4+
5+
ENV GODEBUG=netdns=go
6+
7+
LABEL maintainer="Drone.IO Community <[email protected]>" `
8+
org.label-schema.name="Drone S3" `
9+
org.label-schema.vendor="Drone.IO Community" `
10+
org.label-schema.schema-version="1.0"
11+
12+
ADD release/windows/amd64/drone-s3.exe C:/drone-s3.exe
13+
ENTRYPOINT [ "C:\\drone-s3.exe" ]

docker/manifest.tmpl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@ manifests:
2424
os: linux
2525
variant: v7
2626
-
27-
image: plugins/s3:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-amd64
27+
image: plugins/s3:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64
2828
platform:
2929
architecture: amd64
3030
os: windows
31-
variant: 1809
31+
version: 1809
32+
-
33+
image: plugins/s3:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64
34+
platform:
35+
architecture: amd64
36+
os: windows
37+
version: 1903

0 commit comments

Comments
 (0)