chore(CI): remove drone config

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi.Wu
2022-12-29 21:08:06 +08:00
parent 6a4996cd63
commit 9aef844da2
6 changed files with 0 additions and 610 deletions
-16
View File
@@ -1,16 +0,0 @@
local pipeline = import 'pipeline.libsonnet';
local name = 'drone-scp';
[
pipeline.test,
pipeline.build(name, 'linux', 'amd64'),
pipeline.build(name, 'linux', 'arm64'),
pipeline.build(name, 'linux', 'arm'),
pipeline.release,
pipeline.notifications(depends_on=[
'linux-amd64',
'linux-arm64',
'linux-arm',
'release-binary',
]),
]
-297
View File
@@ -1,297 +0,0 @@
---
kind: pipeline
name: testing
platform:
arch: amd64
os: linux
steps:
- commands:
- make vet
image: golang:1.18
name: vet
pull: always
volumes:
- name: gopath
path: /go
- image: robertstettner/drone-codecov
name: codecov
pull: always
settings:
token:
from_secret: codecov_token
volumes:
- name: gopath
temp: {}
---
depends_on:
- testing
kind: pipeline
name: linux-amd64
platform:
arch: amd64
os: linux
steps:
- commands:
- go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/drone-scp
environment:
CGO_ENABLED: "0"
image: golang:1.18
name: build-push
pull: always
when:
event:
exclude:
- tag
- commands:
- go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}'
-a -o release/linux/amd64/drone-scp
environment:
CGO_ENABLED: "0"
image: golang:1.18
name: build-tag
pull: always
when:
event:
- tag
- commands:
- ./release/linux/amd64/drone-scp --help
image: golang:1.18
name: executable
pull: always
- image: plugins/docker:linux-amd64
name: dryrun
pull: always
settings:
cache_from: appleboy/drone-scp
daemon_off: false
dockerfile: docker/Dockerfile.linux.amd64
dry_run: true
repo: appleboy/drone-scp
tags: linux-amd64
when:
event:
- pull_request
- image: plugins/docker:linux-amd64
name: publish
pull: always
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
cache_from: appleboy/drone-scp
daemon_off: "false"
dockerfile: docker/Dockerfile.linux.amd64
password:
from_secret: docker_password
repo: appleboy/drone-scp
username:
from_secret: docker_username
when:
event:
exclude:
- pull_request
trigger:
ref:
- refs/heads/master
- refs/pull/**
- refs/tags/**
---
depends_on:
- testing
kind: pipeline
name: linux-arm64
platform:
arch: arm64
os: linux
steps:
- commands:
- go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm64/drone-scp
environment:
CGO_ENABLED: "0"
image: golang:1.18
name: build-push
pull: always
when:
event:
exclude:
- tag
- commands:
- go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}'
-a -o release/linux/arm64/drone-scp
environment:
CGO_ENABLED: "0"
image: golang:1.18
name: build-tag
pull: always
when:
event:
- tag
- commands:
- ./release/linux/arm64/drone-scp --help
image: golang:1.18
name: executable
pull: always
- image: plugins/docker:linux-arm64
name: dryrun
pull: always
settings:
cache_from: appleboy/drone-scp
daemon_off: false
dockerfile: docker/Dockerfile.linux.arm64
dry_run: true
repo: appleboy/drone-scp
tags: linux-arm64
when:
event:
- pull_request
- image: plugins/docker:linux-arm64
name: publish
pull: always
settings:
auto_tag: true
auto_tag_suffix: linux-arm64
cache_from: appleboy/drone-scp
daemon_off: "false"
dockerfile: docker/Dockerfile.linux.arm64
password:
from_secret: docker_password
repo: appleboy/drone-scp
username:
from_secret: docker_username
when:
event:
exclude:
- pull_request
trigger:
ref:
- refs/heads/master
- refs/pull/**
- refs/tags/**
---
depends_on:
- testing
kind: pipeline
name: linux-arm
platform:
arch: arm
os: linux
steps:
- commands:
- go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/arm/drone-scp
environment:
CGO_ENABLED: "0"
image: golang:1.18
name: build-push
pull: always
when:
event:
exclude:
- tag
- commands:
- go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}'
-a -o release/linux/arm/drone-scp
environment:
CGO_ENABLED: "0"
image: golang:1.18
name: build-tag
pull: always
when:
event:
- tag
- commands:
- ./release/linux/arm/drone-scp --help
image: golang:1.18
name: executable
pull: always
- image: plugins/docker:linux-arm
name: dryrun
pull: always
settings:
cache_from: appleboy/drone-scp
daemon_off: false
dockerfile: docker/Dockerfile.linux.arm
dry_run: true
repo: appleboy/drone-scp
tags: linux-arm
when:
event:
- pull_request
- image: plugins/docker:linux-arm
name: publish
pull: always
settings:
auto_tag: true
auto_tag_suffix: linux-arm
cache_from: appleboy/drone-scp
daemon_off: "false"
dockerfile: docker/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: appleboy/drone-scp
username:
from_secret: docker_username
when:
event:
exclude:
- pull_request
trigger:
ref:
- refs/heads/master
- refs/pull/**
- refs/tags/**
---
depends_on:
- testing
kind: pipeline
name: release-binary
platform:
arch: amd64
os: linux
steps:
- commands:
- make release
image: golang:1.18
name: build-all-binary
pull: always
when:
event:
- tag
- image: plugins/github-release
name: deploy-all-binary
pull: always
settings:
api_key:
from_secret: github_release_api_key
files:
- dist/release/*
when:
event:
- tag
trigger:
ref:
- refs/tags/**
---
depends_on:
- linux-amd64
- linux-arm64
- linux-arm
- release-binary
kind: pipeline
name: notifications
platform:
arch: amd64
os: linux
steps:
- image: plugins/manifest
name: manifest
pull: always
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/**
-42
View File
@@ -1,42 +0,0 @@
# unifying the coding style for different editors and IDEs => editorconfig.org
; indicate this is the root of the project
root = true
###########################################################
; common
###########################################################
[*]
charset = utf-8
end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
###########################################################
; make
###########################################################
[Makefile]
indent_style = tab
[makefile]
indent_style = tab
###########################################################
; markdown
###########################################################
[*.md]
trim_trailing_whitespace = false
###########################################################
; golang
###########################################################
[*.go]
indent_style = tab
-25
View File
@@ -1,25 +0,0 @@
ignoreGeneratedHeader = false
severity = "warning"
confidence = 0.8
errorCode = 1
warningCode = 1
[rule.blank-imports]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
[rule.error-return]
[rule.error-strings]
[rule.error-naming]
[rule.exported]
[rule.if-return]
[rule.increment-decrement]
[rule.var-naming]
[rule.var-declaration]
[rule.package-comments]
[rule.range]
[rule.receiver-naming]
[rule.time-naming]
[rule.unexported-return]
[rule.indent-error-flow]
[rule.errorf]
-2
View File
@@ -1,11 +1,9 @@
# drone-scp
[![GoDoc](https://godoc.org/github.com/appleboy/drone-scp?status.svg)](https://godoc.org/github.com/appleboy/drone-scp)
[![Build Status](https://cloud.drone.io/api/badges/appleboy/drone-scp/status.svg)](https://cloud.drone.io/appleboy/drone-scp)
[![codecov](https://codecov.io/gh/appleboy/drone-scp/branch/master/graph/badge.svg)](https://codecov.io/gh/appleboy/drone-scp)
[![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/drone-scp)](https://goreportcard.com/report/github.com/appleboy/drone-scp)
[![Docker Pulls](https://img.shields.io/docker/pulls/appleboy/drone-scp.svg)](https://hub.docker.com/r/appleboy/drone-scp/)
[![micro badger](https://images.microbadger.com/badges/image/appleboy/drone-scp.svg)](https://microbadger.com/images/appleboy/drone-scp "Get your own image badge on microbadger.com")
Copy files and artifacts via SSH using a binary, docker or [Drone CI](http://docs.drone.io/).
-228
View File
@@ -1,228 +0,0 @@
{
test:: {
kind: 'pipeline',
name: 'testing',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'vet',
image: 'golang:1.18',
pull: 'always',
commands: [
'make vet',
],
volumes: [
{
name: 'gopath',
path: '/go',
},
],
},
// {
// name: 'test',
// image: 'golang:1.18-alpine',
// pull: 'always',
// commands: [
// 'apk add git make curl perl bash build-base zlib-dev ucl-dev',
// 'make ssh-server',
// 'make test',
// 'make coverage',
// ],
// volumes: [
// {
// name: 'gopath',
// path: '/go',
// },
// ],
// },
{
name: 'codecov',
image: 'robertstettner/drone-codecov',
pull: 'always',
settings: {
token: { 'from_secret': 'codecov_token' },
},
},
],
volumes: [
{
name: 'gopath',
temp: {},
},
],
},
build(name, os='linux', arch='amd64'):: {
kind: 'pipeline',
name: os + '-' + arch,
platform: {
os: os,
arch: arch,
},
steps: [
{
name: 'build-push',
image: 'golang:1.18',
pull: 'always',
environment: {
CGO_ENABLED: '0',
},
commands: [
'go build -v -ldflags \'-X main.build=${DRONE_BUILD_NUMBER}\' -a -o release/' + os + '/' + arch + '/' + name,
],
when: {
event: {
exclude: [ 'tag' ],
},
},
},
{
name: 'build-tag',
image: 'golang:1.18',
pull: 'always',
environment: {
CGO_ENABLED: '0',
},
commands: [
'go build -v -ldflags \'-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\' -a -o release/' + os + '/' + arch + '/' + name,
],
when: {
event: [ 'tag' ],
},
},
{
name: 'executable',
image: 'golang:1.18',
pull: 'always',
commands: [
'./release/' + os + '/' + arch + '/' + name + ' --help',
],
},
{
name: 'dryrun',
image: 'plugins/docker:' + os + '-' + arch,
pull: 'always',
settings: {
daemon_off: false,
dry_run: true,
tags: os + '-' + arch,
dockerfile: 'docker/Dockerfile.' + os + '.' + arch,
repo: 'appleboy/' + name,
cache_from: 'appleboy/' + name,
},
when: {
event: [ 'pull_request' ],
},
},
{
name: 'publish',
image: 'plugins/docker:' + os + '-' + arch,
pull: 'always',
settings: {
daemon_off: 'false',
auto_tag: true,
auto_tag_suffix: os + '-' + arch,
dockerfile: 'docker/Dockerfile.' + os + '.' + arch,
repo: 'appleboy/' + name,
cache_from: 'appleboy/' + name,
username: { 'from_secret': 'docker_username' },
password: { 'from_secret': 'docker_password' },
},
when: {
event: {
exclude: [ 'pull_request' ],
},
},
},
],
depends_on: [
'testing',
],
trigger: {
ref: [
'refs/heads/master',
'refs/pull/**',
'refs/tags/**',
],
},
},
release:: {
kind: 'pipeline',
name: 'release-binary',
platform: {
os: 'linux',
arch: 'amd64',
},
steps: [
{
name: 'build-all-binary',
image: 'golang:1.18',
pull: 'always',
commands: [
'make release'
],
when: {
event: [ 'tag' ],
},
},
{
name: 'deploy-all-binary',
image: 'plugins/github-release',
pull: 'always',
settings: {
files: [ 'dist/release/*' ],
api_key: { 'from_secret': 'github_release_api_key' },
},
when: {
event: [ 'tag' ],
},
},
],
depends_on: [
'testing',
],
trigger: {
ref: [
'refs/tags/**',
],
},
},
notifications(os='linux', arch='amd64', depends_on=[]):: {
kind: 'pipeline',
name: 'notifications',
platform: {
os: os,
arch: arch,
},
steps: [
{
name: 'manifest',
image: 'plugins/manifest',
pull: 'always',
settings: {
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
spec: 'docker/manifest.tmpl',
ignore_missing: true,
},
},
],
depends_on: depends_on,
trigger: {
ref: [
'refs/heads/master',
'refs/tags/**',
],
},
},
signature(key):: {
kind: 'signature',
hmac: key,
}
}