From 1b0a44afc13cbdb42379923114cd0d790001938e Mon Sep 17 00:00:00 2001 From: Don Date: Fri, 15 Mar 2019 15:17:38 -0700 Subject: [PATCH] Add Windows CI --- .drone.windows.jsonnet | 74 ++++++++++++++++++++++++++++++++++++++++++ .drone.windows.yml | 65 +++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 .drone.windows.jsonnet create mode 100644 .drone.windows.yml diff --git a/.drone.windows.jsonnet b/.drone.windows.jsonnet new file mode 100644 index 0000000..c07acc1 --- /dev/null +++ b/.drone.windows.jsonnet @@ -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, + }, +] diff --git a/.drone.windows.yml b/.drone.windows.yml new file mode 100644 index 0000000..0966053 --- /dev/null +++ b/.drone.windows.yml @@ -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 + +...