(maint) move to harness.drone.io
This commit is contained in:
parent
e1d38a4009
commit
463233b421
11 changed files with 236 additions and 817 deletions
476
.drone.yml
476
.drone.yml
|
|
@ -1,324 +1,254 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: vm
|
||||
name: testing
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
pool:
|
||||
use: ubuntu
|
||||
|
||||
steps:
|
||||
- name: vet
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- go vet ./...
|
||||
environment:
|
||||
GO111MODULE: on
|
||||
volumes:
|
||||
- name: gopath
|
||||
path: /go
|
||||
|
||||
- name: test
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- go test -cover ./...
|
||||
environment:
|
||||
GO111MODULE: on
|
||||
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: {}
|
||||
|
||||
- name: gopath
|
||||
temp: {}
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
- refs/pull/**
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: vm
|
||||
name: linux-amd64
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
pool:
|
||||
use: ubuntu
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-hugo"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-hugo"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: executable
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- ./release/linux/amd64/drone-hugo --help
|
||||
|
||||
- name: dryrun
|
||||
pull: always
|
||||
image: plugins/docker:linux-amd64
|
||||
settings:
|
||||
daemon_off: false
|
||||
dockerfile: docker/Dockerfile.linux.amd64
|
||||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/hugo
|
||||
tags: linux-amd64
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
- name: publish
|
||||
pull: always
|
||||
image: plugins/docker:linux-amd64
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
daemon_off: false
|
||||
dockerfile: docker/Dockerfile.linux.amd64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/hugo
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- 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-hugo .
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: docker/Dockerfile.linux.amd64
|
||||
repo: plugins/hugo
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
depends_on:
|
||||
- testing
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- testing
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
- refs/pull/**
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: vm
|
||||
name: linux-arm64
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
pool:
|
||||
use: ubuntu_arm64
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-hugo"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-hugo"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: executable
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- ./release/linux/arm64/drone-hugo --help
|
||||
|
||||
- name: dryrun
|
||||
pull: always
|
||||
image: plugins/docker:linux-arm64
|
||||
settings:
|
||||
daemon_off: false
|
||||
dockerfile: docker/Dockerfile.linux.arm64
|
||||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/hugo
|
||||
tags: linux-arm64
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
- name: publish
|
||||
pull: always
|
||||
image: plugins/docker:linux-arm64
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64
|
||||
daemon_off: false
|
||||
dockerfile: docker/Dockerfile.linux.arm64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/hugo
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- 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-hugo .
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: docker/Dockerfile.linux.arm64
|
||||
repo: plugins/hugo
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64
|
||||
depends_on:
|
||||
- testing
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
depends_on:
|
||||
- testing
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
- refs/pull/**
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm
|
||||
|
||||
type: vm
|
||||
name: windows-1809
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm
|
||||
os: windows
|
||||
arch: amd64
|
||||
pool:
|
||||
use: windows
|
||||
|
||||
steps:
|
||||
- name: build-push
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-hugo"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-hugo"
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GO111MODULE: on
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: executable
|
||||
pull: always
|
||||
image: golang:1.14
|
||||
commands:
|
||||
- ./release/linux/arm/drone-hugo --help
|
||||
|
||||
- name: dryrun
|
||||
pull: always
|
||||
image: plugins/docker:linux-arm
|
||||
settings:
|
||||
daemon_off: false
|
||||
dockerfile: docker/Dockerfile.linux.arm
|
||||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/hugo
|
||||
tags: linux-arm
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
- name: publish
|
||||
pull: always
|
||||
image: plugins/docker:linux-arm
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm
|
||||
daemon_off: false
|
||||
dockerfile: docker/Dockerfile.linux.arm
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: plugins/hugo
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- 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-hugo.exe .
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: docker/Dockerfile.windows.1809
|
||||
repo: plugins/hugo
|
||||
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/**"
|
||||
|
||||
depends_on:
|
||||
- testing
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
- refs/pull/**
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notifications
|
||||
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-hugo.exe .
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
dockerfile: docker/Dockerfile.windows.ltsc2022
|
||||
repo: plugins/hugo
|
||||
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
|
||||
pull: always
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: docker/manifest.tmpl
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
- 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/**"
|
||||
|
||||
depends_on:
|
||||
- linux-amd64
|
||||
- linux-arm64
|
||||
- linux-arm
|
||||
|
||||
...
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue