Add Windows CI
This commit is contained in:
parent
e7468f9a19
commit
1b0a44afc1
74
.drone.windows.jsonnet
Normal file
74
.drone.windows.jsonnet
Normal 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
65
.drone.windows.yml
Normal 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
|
||||
|
||||
...
|
Loading…
Reference in New Issue
Block a user