Merge pull request #11 from donny-dont/windows-ci

Add Windows CI
This commit is contained in:
Brad Rydzewski 2019-03-15 15:22:07 -07:00 committed by GitHub
commit 3174a3cfd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 139 additions and 0 deletions

74
.drone.windows.jsonnet Normal file
View File

@ -0,0 +1,74 @@
local windows_pipe = '\\\\\\\\.\\\\pipe\\\\docker_engine';
local windows_pipe_volume = 'docker_pipe';
local versions = [
//'1803',
'1809',
];
local trigger = {
ref: [
'refs/heads/master',
'refs/tags/**',
],
};
local pipeline_name(version) = 'Windows ' + version;
local pipeline(version, arch) = {
kind: 'pipeline',
name: pipeline_name(version),
platform: {
os: 'windows',
arch: arch,
version: version,
},
steps: [{
name: 'git',
image: 'plugins/docker:windows-1809', // TODO: This should just use the manifest
settings: {
repo: 'drone/git',
dockerfile: 'docker/Dockerfile.windows.' + version,
auto_tag: true,
auto_tag_suffix: 'windows-' + version + '-' + arch,
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
// Windows specific options
daemon_off: true,
purge: 'false', // TODO: Fix bug where setting false won't generate the yaml value
},
volumes: [{ name: windows_pipe_volume, path: windows_pipe }],
}],
volumes: [{ name: windows_pipe_volume, host: { path: windows_pipe } }],
trigger: trigger,
};
[
pipeline(version, 'amd64')
for version in versions
] + [
{
kind: 'pipeline',
name: 'Image Manifest',
steps: [{
name: 'manifest',
image: 'plugins/manifest',
settings: {
spec: 'docker/manifest.tmpl',
ignore_missing: true,
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
}],
depends_on: [
pipeline_name(version)
for version in versions
],
trigger: trigger,
},
]

65
.drone.windows.yml Normal file
View File

@ -0,0 +1,65 @@
---
kind: pipeline
name: Windows 1809
platform:
os: windows
arch: amd64
version: 1809
steps:
- name: git
image: plugins/docker:windows-1809
settings:
auto_tag: true
auto_tag_suffix: windows-1809-amd64
daemon_off: true
dockerfile: docker/Dockerfile.windows.1809
password:
from_secret: docker_password
purge: false
repo: drone/git
username:
from_secret: docker_username
volumes:
- name: docker_pipe
path: \\\\.\\pipe\\docker_engine
volumes:
- name: docker_pipe
host:
path: \\\\.\\pipe\\docker_engine
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
---
kind: pipeline
name: Image Manifest
platform:
os: linux
arch: amd64
steps:
- name: manifest
image: plugins/manifest
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: docker/manifest.tmpl
username:
from_secret: docker_username
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
depends_on:
- Windows 1809
...