From 058dcd40d8c5899dff7d30566cae7a1243e0f175 Mon Sep 17 00:00:00 2001 From: "Bo-Yi.Wu" Date: Sat, 24 Dec 2022 21:31:52 +0800 Subject: [PATCH] chore(CI): remove drone CI config Signed-off-by: Bo-Yi.Wu --- .drone.jsonnet | 16 ---- .drone.yml | 151 ------------------------------ pipeline.libsonnet | 229 --------------------------------------------- 3 files changed, 396 deletions(-) delete mode 100644 .drone.jsonnet delete mode 100644 .drone.yml delete mode 100644 pipeline.libsonnet diff --git a/.drone.jsonnet b/.drone.jsonnet deleted file mode 100644 index 77b41d1..0000000 --- a/.drone.jsonnet +++ /dev/null @@ -1,16 +0,0 @@ -local pipeline = import 'pipeline.libsonnet'; -local name = 'drone-ssh'; - -[ - 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', - ]), -] diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 5a8eb0c..0000000 --- a/.drone.yml +++ /dev/null @@ -1,151 +0,0 @@ ---- -kind: pipeline -name: testing -platform: - arch: amd64 - os: linux -steps: -- commands: - - make vet - image: golang:1.19 - 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-ssh - environment: - CGO_ENABLED: "0" - image: golang:1.19 - 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-ssh - environment: - CGO_ENABLED: "0" - image: golang:1.19 - name: build-tag - pull: always - when: - event: - - tag -- commands: - - ./release/linux/amd64/drone-ssh --help - image: golang:1.19 - name: executable - pull: always -- image: plugins/docker:linux-amd64 - name: dryrun - pull: always - settings: - cache_from: appleboy/drone-ssh - daemon_off: false - dockerfile: docker/Dockerfile.linux.amd64 - dry_run: true - repo: appleboy/drone-ssh - 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-ssh - daemon_off: "false" - dockerfile: docker/Dockerfile.linux.amd64 - password: - from_secret: docker_password - repo: appleboy/drone-ssh - 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: - - export PATH=$PATH:$GOPATH/bin - - make release - image: techknowlogick/xgo:go-1.19.x - 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 -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/** diff --git a/pipeline.libsonnet b/pipeline.libsonnet deleted file mode 100644 index 865cc04..0000000 --- a/pipeline.libsonnet +++ /dev/null @@ -1,229 +0,0 @@ -{ - test:: { - kind: 'pipeline', - name: 'testing', - platform: { - os: 'linux', - arch: 'amd64', - }, - steps: [ - { - name: 'vet', - image: 'golang:1.19', - pull: 'always', - commands: [ - 'make vet', - ], - volumes: [ - { - name: 'gopath', - path: '/go', - }, - ], - }, - // { - // name: 'test', - // image: 'golang:1.19-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.19', - 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.19', - 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.19', - 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: 'techknowlogick/xgo:go-1.19.x', - pull: 'always', - commands: [ - 'export PATH=$PATH:$GOPATH/bin', - '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, - } -}