From 090bbdbb739a9ff55bf96c23ce6cb9048d8273c6 Mon Sep 17 00:00:00 2001 From: Shubham Agrawal Date: Fri, 3 Dec 2021 12:48:45 +0530 Subject: [PATCH] fix yaml --- .drone.yml | 334 ++++++++++++++++------------- docker/acr/Dockerfile.windows.1903 | 10 + docker/acr/Dockerfile.windows.1909 | 10 + docker/acr/manifest.tmpl | 16 +- docker/docker/manifest.tmpl | 2 +- docker/ecr/Dockerfile.windows.1903 | 10 + docker/ecr/Dockerfile.windows.1909 | 10 + docker/ecr/manifest.tmpl | 12 ++ docker/gcr/Dockerfile.windows.1903 | 10 + docker/gcr/Dockerfile.windows.1909 | 10 + docker/gcr/manifest.tmpl | 12 ++ 11 files changed, 287 insertions(+), 149 deletions(-) create mode 100644 docker/acr/Dockerfile.windows.1903 create mode 100644 docker/acr/Dockerfile.windows.1909 create mode 100644 docker/ecr/Dockerfile.windows.1903 create mode 100644 docker/ecr/Dockerfile.windows.1909 create mode 100644 docker/gcr/Dockerfile.windows.1903 create mode 100644 docker/gcr/Dockerfile.windows.1909 diff --git a/.drone.yml b/.drone.yml index b729cd6..ee5f52b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,120 +37,6 @@ trigger: - "refs/tags/**" - "refs/pull/**" ---- -kind: pipeline -type: ssh -name: windows-1809 - -platform: - os: windows - -server: - host: windows.1809.amd64.plugins.drone.ci - password: - from_secret: windows_password - user: - from_secret: windows_username - -steps: -- name: build-docker - commands: - - go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker - - docker login -u $env:USERNAME -p $env:PASSWORD - - | - $tag="windows-1809-amd64" - if (Test-Path env:DRONE_SEMVER_SHORT) { - $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" - } - docker build -f docker/docker/Dockerfile.windows.1809 -t plugins/docker:$tag . - docker push plugins/docker:$tag - environment: - CGO_ENABLED: "0" - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - -- name: build-gcr - commands: - - go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr - - docker login -u $env:USERNAME -p $env:PASSWORD - - | - $tag="windows-1809-amd64" - if (Test-Path env:DRONE_SEMVER_SHORT) { - $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" - } - docker build -f docker/gcr/Dockerfile.windows.1809 -t plugins/gcr:$tag . - docker push plugins/gcr:$tag - environment: - CGO_ENABLED: "0" - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - -- name: build-ecr - commands: - - go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr - - docker login -u $env:USERNAME -p $env:PASSWORD - - | - $tag="windows-1809-amd64" - if (Test-Path env:DRONE_SEMVER_SHORT) { - $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" - } - docker build -f docker/ecr/Dockerfile.windows.1809 -t plugins/ecr:$tag . - docker push plugins/ecr:$tag - environment: - CGO_ENABLED: "0" - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - -- name: build-acr - commands: - - go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr - - docker login -u $env:USERNAME -p $env:PASSWORD - - | - $tag="windows-1809-amd64" - if (Test-Path env:DRONE_SEMVER_SHORT) { - $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" - } - docker build -f docker/acr/Dockerfile.windows.1809 -t plugins/acr:$tag . - docker push plugins/acr:$tag - environment: - CGO_ENABLED: "0" - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - -- name: build-heroku - commands: - - go build -o release/windows/amd64/drone-heroku.exe ./cmd/drone-heroku - - docker login -u $env:USERNAME -p $env:PASSWORD - - | - $tag="windows-1809-amd64" - if (Test-Path env:DRONE_SEMVER_SHORT) { - $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" - } - docker build -f docker/heroku/Dockerfile.windows.1809 -t plugins/heroku:$tag . - docker push plugins/heroku:$tag - environment: - CGO_ENABLED: "0" - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - -trigger: - event: - - push - - tag - -depends_on: -- testing - --- kind: pipeline type: ssh @@ -239,17 +125,191 @@ steps: PASSWORD: from_secret: docker_password -- name: build-heroku +trigger: + event: + - push + - tag + +depends_on: +- testing + +--- +kind: pipeline +type: ssh +name: windows-1809 + +platform: + os: windows + +server: + host: windows.1809.amd64.plugins.drone.ci + password: + from_secret: windows_password + user: + from_secret: windows_username + +steps: +- name: build-docker commands: - - go build -o release/windows/amd64/drone-heroku.exe ./cmd/drone-heroku + - go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker - docker login -u $env:USERNAME -p $env:PASSWORD - | - $tag="windows-1803-amd64" + $tag="windows-1809-amd64" if (Test-Path env:DRONE_SEMVER_SHORT) { - $tag="$env:DRONE_SEMVER_SHORT-windows-1803-amd64" + $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" } - docker build -f docker/heroku/Dockerfile.windows.1803 -t plugins/heroku:$tag . - docker push plugins/heroku:$tag + docker build -f docker/docker/Dockerfile.windows.1809 -t plugins/docker:$tag . + docker push plugins/docker:$tag + environment: + CGO_ENABLED: "0" + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + +- name: build-gcr + commands: + - go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr + - docker login -u $env:USERNAME -p $env:PASSWORD + - | + $tag="windows-1809-amd64" + if (Test-Path env:DRONE_SEMVER_SHORT) { + $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" + } + docker build -f docker/gcr/Dockerfile.windows.1809 -t plugins/gcr:$tag . + docker push plugins/gcr:$tag + environment: + CGO_ENABLED: "0" + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + +- name: build-ecr + commands: + - go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr + - docker login -u $env:USERNAME -p $env:PASSWORD + - | + $tag="windows-1809-amd64" + if (Test-Path env:DRONE_SEMVER_SHORT) { + $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" + } + docker build -f docker/ecr/Dockerfile.windows.1809 -t plugins/ecr:$tag . + docker push plugins/ecr:$tag + environment: + CGO_ENABLED: "0" + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + +- name: build-acr + commands: + - go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr + - docker login -u $env:USERNAME -p $env:PASSWORD + - | + $tag="windows-1809-amd64" + if (Test-Path env:DRONE_SEMVER_SHORT) { + $tag="$env:DRONE_SEMVER_SHORT-windows-1809-amd64" + } + docker build -f docker/acr/Dockerfile.windows.1809 -t plugins/acr:$tag . + docker push plugins/acr:$tag + environment: + CGO_ENABLED: "0" + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + +trigger: + event: + - push + - tag + +depends_on: +- testing + +--- +kind: pipeline +type: ssh +name: windows-1903 + +platform: + os: windows + +server: + host: windows.1903.amd64.plugins.drone.ci + password: + from_secret: windows_password + user: + from_secret: windows_username + +steps: +- name: build-docker + commands: + - go build -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker + - docker login -u $env:USERNAME -p $env:PASSWORD + - | + $tag="windows-1903-amd64" + if (Test-Path env:DRONE_SEMVER_SHORT) { + $tag="$env:DRONE_SEMVER_SHORT-windows-1903-amd64" + } + docker build -f docker/docker/Dockerfile.windows.1903 -t plugins/docker:$tag . + docker push plugins/docker:$tag + environment: + CGO_ENABLED: "0" + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + +- name: build-gcr + commands: + - go build -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr + - docker login -u $env:USERNAME -p $env:PASSWORD + - | + $tag="windows-1903-amd64" + if (Test-Path env:DRONE_SEMVER_SHORT) { + $tag="$env:DRONE_SEMVER_SHORT-windows-1903-amd64" + } + docker build -f docker/gcr/Dockerfile.windows.1903 -t plugins/gcr:$tag . + docker push plugins/gcr:$tag + environment: + CGO_ENABLED: "0" + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + +- name: build-ecr + commands: + - go build -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr + - docker login -u $env:USERNAME -p $env:PASSWORD + - | + $tag="windows-1903-amd64" + if (Test-Path env:DRONE_SEMVER_SHORT) { + $tag="$env:DRONE_SEMVER_SHORT-windows-1903-amd64" + } + docker build -f docker/ecr/Dockerfile.windows.1903 -t plugins/ecr:$tag . + docker push plugins/ecr:$tag + environment: + CGO_ENABLED: "0" + USERNAME: + from_secret: docker_username + PASSWORD: + from_secret: docker_password + +- name: build-acr + commands: + - go build -o release/windows/amd64/drone-acr.exe ./cmd/drone-acr + - docker login -u $env:USERNAME -p $env:PASSWORD + - | + $tag="windows-1903-amd64" + if (Test-Path env:DRONE_SEMVER_SHORT) { + $tag="$env:DRONE_SEMVER_SHORT-windows-1903-amd64" + } + docker build -f docker/acr/Dockerfile.windows.1903 -t plugins/acr:$tag . + docker push plugins/acr:$tag environment: CGO_ENABLED: "0" USERNAME: @@ -353,25 +413,6 @@ steps: PASSWORD: from_secret: docker_password -- name: build-heroku - commands: - - go build -o release/windows/amd64/drone-heroku.exe ./cmd/drone-heroku - - docker login -u $env:USERNAME -p $env:PASSWORD - - | - $tag="windows-1909-amd64" - if (Test-Path env:DRONE_SEMVER_SHORT) { - $tag="$env:DRONE_SEMVER_SHORT-windows-1909-amd64" - } - docker build -f docker/heroku/Dockerfile.windows.1909 -t plugins/heroku:$tag . - docker push plugins/heroku:$tag - environment: - CGO_ENABLED: "0" - USERNAME: - from_secret: docker_username - PASSWORD: - from_secret: docker_password - - trigger: event: - push @@ -595,8 +636,9 @@ trigger: - "refs/tags/**" depends_on: -- windows-1809 - windows-1803 +- windows-1809 +- windows-1903 - windows-1909 - linux-amd64-docker - linux-arm64-docker @@ -802,8 +844,9 @@ trigger: - "refs/tags/**" depends_on: -- windows-1809 - windows-1803 +- windows-1809 +- windows-1903 - windows-1909 - linux-amd64-gcr - linux-arm64-gcr @@ -1009,8 +1052,9 @@ trigger: - "refs/tags/**" depends_on: -- windows-1809 - windows-1803 +- windows-1809 +- windows-1903 - windows-1909 - linux-amd64-ecr - linux-arm64-ecr @@ -1216,9 +1260,6 @@ trigger: - "refs/tags/**" depends_on: -- windows-1809 -- windows-1803 -- windows-1909 - linux-amd64-heroku - linux-arm64-heroku - linux-arm-heroku @@ -1422,8 +1463,9 @@ trigger: - "refs/tags/**" depends_on: -- windows-1809 - windows-1803 +- windows-1809 +- windows-1903 - windows-1909 - linux-amd64-acr - linux-arm64-acr diff --git a/docker/acr/Dockerfile.windows.1903 b/docker/acr/Dockerfile.windows.1903 new file mode 100644 index 0000000..c30d190 --- /dev/null +++ b/docker/acr/Dockerfile.windows.1903 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1903 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone ACR" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-acr.exe C:/bin/drone-acr.exe +ENTRYPOINT [ "C:\\bin\\drone-acr.exe" ] diff --git a/docker/acr/Dockerfile.windows.1909 b/docker/acr/Dockerfile.windows.1909 new file mode 100644 index 0000000..155cb12 --- /dev/null +++ b/docker/acr/Dockerfile.windows.1909 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1909 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone ACR" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-acr.exe C:/bin/drone-acr.exe +ENTRYPOINT [ "C:\\bin\\drone-acr.exe" ] diff --git a/docker/acr/manifest.tmpl b/docker/acr/manifest.tmpl index d1acb34..c84e3c6 100644 --- a/docker/acr/manifest.tmpl +++ b/docker/acr/manifest.tmpl @@ -24,14 +24,26 @@ manifests: os: linux variant: v7 - - image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803 + image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 platform: architecture: amd64 os: windows version: 1803 - - image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809 + image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809-amd64 platform: architecture: amd64 os: windows version: 1809 + - + image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903-amd64 + platform: + architecture: amd64 + os: windows + version: 1903 + - + image: plugins/acr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909-amd64 + platform: + architecture: amd64 + os: windows + version: 1909 diff --git a/docker/docker/manifest.tmpl b/docker/docker/manifest.tmpl index 4766c36..915e3d0 100644 --- a/docker/docker/manifest.tmpl +++ b/docker/docker/manifest.tmpl @@ -24,7 +24,7 @@ manifests: os: linux variant: v7 - - image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803 + image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803-amd64 platform: architecture: amd64 os: windows diff --git a/docker/ecr/Dockerfile.windows.1903 b/docker/ecr/Dockerfile.windows.1903 new file mode 100644 index 0000000..4b20ada --- /dev/null +++ b/docker/ecr/Dockerfile.windows.1903 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1903 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone ECR" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-ecr.exe C:/bin/drone-ecr.exe +ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ] diff --git a/docker/ecr/Dockerfile.windows.1909 b/docker/ecr/Dockerfile.windows.1909 new file mode 100644 index 0000000..b7b6e3e --- /dev/null +++ b/docker/ecr/Dockerfile.windows.1909 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1909 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone ECR" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-ecr.exe C:/bin/drone-ecr.exe +ENTRYPOINT [ "C:\\bin\\drone-ecr.exe" ] diff --git a/docker/ecr/manifest.tmpl b/docker/ecr/manifest.tmpl index 8af16c7..9c26521 100644 --- a/docker/ecr/manifest.tmpl +++ b/docker/ecr/manifest.tmpl @@ -35,3 +35,15 @@ manifests: architecture: amd64 os: windows version: 1809 + - + image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903 + platform: + architecture: amd64 + os: windows + version: 1903 + - + image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909 + platform: + architecture: amd64 + os: windows + version: 1909 diff --git a/docker/gcr/Dockerfile.windows.1903 b/docker/gcr/Dockerfile.windows.1903 new file mode 100644 index 0000000..df135cf --- /dev/null +++ b/docker/gcr/Dockerfile.windows.1903 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1903 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone GCR" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-gcr.exe C:/bin/drone-gcr.exe +ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ] diff --git a/docker/gcr/Dockerfile.windows.1909 b/docker/gcr/Dockerfile.windows.1909 new file mode 100644 index 0000000..3b188b0 --- /dev/null +++ b/docker/gcr/Dockerfile.windows.1909 @@ -0,0 +1,10 @@ +# escape=` +FROM plugins/docker:windows-1909 + +LABEL maintainer="Drone.IO Community " ` + org.label-schema.name="Drone GCR" ` + org.label-schema.vendor="Drone.IO Community" ` + org.label-schema.schema-version="1.0" + +ADD release/windows/amd64/drone-gcr.exe C:/bin/drone-gcr.exe +ENTRYPOINT [ "C:\\bin\\drone-gcr.exe" ] diff --git a/docker/gcr/manifest.tmpl b/docker/gcr/manifest.tmpl index 8b9231a..f87918f 100644 --- a/docker/gcr/manifest.tmpl +++ b/docker/gcr/manifest.tmpl @@ -35,3 +35,15 @@ manifests: architecture: amd64 os: windows version: 1809 + - + image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1903 + platform: + architecture: amd64 + os: windows + version: 1803 + - + image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1909 + platform: + architecture: amd64 + os: windows + version: 1809