-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from tphoney/move_to_harness
(fix) add better windows support and move to harness.drone.io
- Loading branch information
Showing
9 changed files
with
296 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,287 @@ | ||
kind: pipeline | ||
type: vm | ||
name: testing | ||
platform: | ||
os: linux | ||
arch: amd64 | ||
pool: | ||
use: ubuntu | ||
|
||
steps: | ||
- name: static check | ||
image: golang:1.19 | ||
pull: always | ||
commands: | ||
- go get honnef.co/go/tools/cmd/staticcheck | ||
- go run honnef.co/go/tools/cmd/staticcheck ./... | ||
volumes: | ||
- name: gopath | ||
path: "/go" | ||
- name: lint | ||
image: golang:1.19 | ||
pull: always | ||
commands: | ||
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
- golangci-lint version | ||
- golangci-lint run | ||
volumes: | ||
- name: gopath | ||
path: "/go" | ||
- name: test | ||
image: golang:1.19 | ||
commands: | ||
- go test -cover ./... | ||
volumes: | ||
- name: gopath | ||
path: "/go" | ||
volumes: | ||
- name: gopath | ||
temp: {} | ||
trigger: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
- refs/pull/** | ||
|
||
--- | ||
kind: pipeline | ||
type: vm | ||
name: linux-amd64 | ||
platform: | ||
os: linux | ||
arch: amd64 | ||
pool: | ||
use: ubuntu | ||
|
||
steps: | ||
- name: environment | ||
image: golang:1.19 | ||
pull: always | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go version | ||
- go env | ||
- name: build | ||
image: golang:1.19 | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/amd64/drone-github-release ./cmd/drone-github-release | ||
- name: executable | ||
image: golang:1.19 | ||
commands: | ||
- ./release/linux/amd64/drone-github-release --help | ||
- name: docker | ||
image: plugins/docker | ||
settings: | ||
dockerfile: docker/Dockerfile.linux.amd64 | ||
repo: plugins/github-release | ||
username: | ||
from_secret: docker_username | ||
password: | ||
from_secret: docker_password | ||
auto_tag: true | ||
auto_tag_suffix: linux-amd64 | ||
when: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
depends_on: | ||
- testing | ||
trigger: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
- refs/pull/** | ||
|
||
--- | ||
kind: pipeline | ||
type: vm | ||
name: linux-arm64 | ||
platform: | ||
os: linux | ||
arch: amd64 | ||
pool: | ||
use: ubuntu_arm64 | ||
|
||
steps: | ||
- name: environment | ||
image: golang:1.19 | ||
pull: always | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go version | ||
- go env | ||
- name: build | ||
image: golang:1.19 | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/linux/arm64/drone-github-release ./cmd/drone-github-release | ||
- name: executable | ||
image: golang:1.19 | ||
commands: | ||
- ./release/linux/arm64/drone-github-release --help | ||
- name: docker | ||
image: plugins/docker | ||
settings: | ||
dockerfile: docker/Dockerfile.linux.arm64 | ||
repo: plugins/github-release | ||
username: | ||
from_secret: docker_username | ||
password: | ||
from_secret: docker_password | ||
auto_tag: true | ||
auto_tag_suffix: linux-arm64 | ||
when: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
depends_on: | ||
- testing | ||
trigger: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
- refs/pull/** | ||
|
||
--- | ||
kind: pipeline | ||
type: vm | ||
name: windows-1809 | ||
platform: | ||
os: windows | ||
arch: amd64 | ||
pool: | ||
use: windows | ||
|
||
steps: | ||
- name: environment | ||
image: golang:1.19 | ||
pull: always | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go version | ||
- go env | ||
- name: build | ||
image: golang:1.19 | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/windows/amd64/drone-github-release.exe ./cmd/drone-github-release | ||
- name: executable | ||
image: golang:1.19 | ||
commands: | ||
- ./release/windows/amd64/drone-github-release.exe --help | ||
- name: docker | ||
image: plugins/docker | ||
settings: | ||
dockerfile: docker/Dockerfile.windows.1809 | ||
repo: plugins/github-release | ||
username: | ||
from_secret: docker_username | ||
password: | ||
from_secret: docker_password | ||
auto_tag: true | ||
auto_tag_suffix: windows-1809-amd64 | ||
daemon_off: true | ||
purge: false | ||
when: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
depends_on: | ||
- testing | ||
trigger: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
- refs/pull/** | ||
|
||
--- | ||
kind: pipeline | ||
type: vm | ||
name: windows-ltsc2022 | ||
platform: | ||
os: windows | ||
arch: amd64 | ||
pool: | ||
use: windows-2022 | ||
|
||
steps: | ||
- name: environment | ||
image: golang:1.19 | ||
pull: always | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go version | ||
- go env | ||
- name: build | ||
image: golang:1.19 | ||
environment: | ||
CGO_ENABLED: "0" | ||
commands: | ||
- go build -v -ldflags "-X main.version=" -a -tags netgo -o release/windows/amd64/drone-github-release.exe ./cmd/drone-github-release | ||
- name: executable | ||
image: golang:1.19 | ||
commands: | ||
- ./release/windows/amd64/drone-github-release.exe --help | ||
- name: docker | ||
image: plugins/docker | ||
settings: | ||
dockerfile: docker/Dockerfile.windows.ltsc2022 | ||
repo: plugins/github-release | ||
username: | ||
from_secret: docker_username | ||
password: | ||
from_secret: docker_password | ||
auto_tag: true | ||
auto_tag_suffix: windows-ltsc2022-amd64 | ||
daemon_off: true | ||
purge: false | ||
when: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
depends_on: | ||
- testing | ||
trigger: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** | ||
- refs/pull/** | ||
|
||
--- | ||
kind: pipeline | ||
type: vm | ||
name: manifest | ||
platform: | ||
os: linux | ||
arch: amd64 | ||
pool: | ||
use: ubuntu | ||
|
||
steps: | ||
- name: manifest | ||
image: plugins/manifest | ||
settings: | ||
auto_tag: "true" | ||
username: | ||
from_secret: docker_username | ||
password: | ||
from_secret: docker_password | ||
spec: docker/manifest.tmpl | ||
ignore_missing: true | ||
depends_on: | ||
- linux-amd64 | ||
- linux-arm64 | ||
- windows-1809 | ||
- windows-ltsc2022 | ||
trigger: | ||
ref: | ||
- refs/heads/master | ||
- refs/tags/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
/drone-github-release* | ||
|
||
coverage.out | ||
.drone.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
docker/Dockerfile.windows.1903 → docker/Dockerfile.windows.ltsc2022
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# escape=` | ||
FROM plugins/base:windows-1903-amd64@sha256:338cdba56a7f30d721b6567d382b95465642993f85564cb385e65b2f3f84352c | ||
FROM plugins/base:windows-ltsc2022-amd64@sha256:0f90d5bceb432f1ee6f93cf44eed6a38c322834edd55df8a6648c9e6f15131f4 | ||
|
||
LABEL maintainer="Drone.IO Community <[email protected]>" ` | ||
org.label-schema.name="Drone GitHub Release" ` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.