Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
feat: add octopus
Browse files Browse the repository at this point in the history
add octopus logic

Co-authored-by: Guangbo Chen <[email protected]>
  • Loading branch information
Frank Mai and guangbochen committed Apr 13, 2020
0 parents commit c2ed83b
Show file tree
Hide file tree
Showing 2,927 changed files with 1,141,461 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
.dapper

# Directories
## Output of build progress
dist
## bin ## the bin directory uses for docker build
## Cache of go build/golangci-lint
.cache
## Cache of docker build
.docker
## Configuration of k3s
.config
## Configuration of kubectl
.kube
## Editor and IDE paraphernalia
.idea

# Files
## Dapper temporary files
**/Dockerfile.dapper*
!**/Dockerfile.dapper
## Test binary, build with `go test -c`
*.test
## Output of the go coverage tool, specifically when used with LiteIDE
*.out
## Editor and IDE paraphernalia
.idea
*.swp
*.swo
*~
.vim*
.bash*
## Mac storage information
.DS_Store
349 changes: 349 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,349 @@
---
kind: pipeline
name: lint
platform:
os: linux
arch: amd64
steps:
- name: commit-message
image: outillage/commitsar
commands:
- commitsar -d /drone/src -v
- name: code
image: golang:1.13.9-buster
commands:
- make all lint only
trigger:
event:
include:
- push
- pull_request
node:
instance: agent-amd64



---
kind: pipeline
name: integration-test
platform:
os: linux
arch: amd64
steps:
- name: verify
image: maiwj/drone-dapper:v0.4.2
privileged: true
environment:
BY: dapper
LOCAL_CLUSTER_KIND: kind
commands:
- make all verify only
volumes:
- name: docker
path: /var/run/docker.sock
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
event:
include:
- push
- pull_request
node:
instance: agent-amd64
depends_on:
- lint



---
kind: pipeline
name: build-linux-amd64
platform:
os: linux
arch: amd64
steps:
- name: test
image: maiwj/drone-dapper:v0.4.2
privileged: true
environment:
BY: dapper
commands:
- make all test only
volumes:
- name: docker
path: /var/run/docker.sock
- name: build
image: maiwj/drone-dapper:v0.4.2
privileged: true
environment:
BY: dapper
commands:
- make all build only
volumes:
- name: docker
path: /var/run/docker.sock
- name: package
image: maiwj/drone-dapper:v0.4.2
environment:
BY: dapper
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
REPO:
from_secret: image_repo
WITHOUT_MANIFEST: true
commands:
- make all package only
- make all deploy only
volumes:
- name: docker
path: /var/run/docker.sock
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
- "refs/tags/v*"
event:
exculde:
- pull_request
depends_on:
- test
- build
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
event:
include:
- push
- pull_request
- tag
node:
instance: agent-amd64
depends_on:
- integration-test



---
kind: pipeline
name: build-linux-arm64
platform:
os: linux
arch: arm64
steps:
- name: test
image: maiwj/drone-dapper:v0.4.2
privileged: true
environment:
BY: dapper
commands:
- make all test only
volumes:
- name: docker
path: /var/run/docker.sock
- name: build
image: maiwj/drone-dapper:v0.4.2
privileged: true
environment:
BY: dapper
commands:
- make all build only
volumes:
- name: docker
path: /var/run/docker.sock
- name: package
image: maiwj/drone-dapper:v0.4.2
environment:
BY: dapper
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
REPO:
from_secret: image_repo
WITHOUT_MANIFEST: true
commands:
- make all package only
- make all deploy only
volumes:
- name: docker
path: /var/run/docker.sock
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
- "refs/tags/v*"
event:
exculde:
- pull_request
depends_on:
- test
- build
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
event:
include:
- push
- pull_request
- tag
node:
instance: agent-arm64
depends_on:
- integration-test



---
kind: pipeline
name: build-linux-arm
platform:
os: linux
arch: arm
steps:
- name: test
image: maiwj/drone-dapper:v0.4.2
privileged: true
environment:
BY: dapper
commands:
- make all test only
volumes:
- name: docker
path: /var/run/docker.sock
- name: build
image: maiwj/drone-dapper:v0.4.2
privileged: true
environment:
BY: dapper
REPO:
from_secret: image_repo
commands:
- make all build only
volumes:
- name: docker
path: /var/run/docker.sock
- name: package
image: maiwj/drone-dapper:v0.4.2
environment:
BY: dapper
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
REPO:
from_secret: image_repo
WITHOUT_MANIFEST: true
commands:
- make all package only
- make all deploy only
volumes:
- name: docker
path: /var/run/docker.sock
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
- "refs/tags/v*"
event:
exculde:
- pull_request
depends_on:
- test
- build
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
event:
include:
- push
- pull_request
- tag
node:
instance: agent-arm
depends_on:
- integration-test



---
kind: pipeline
name: manifest
platform:
os: linux
arch: amd64
steps:
- name: push
image: maiwj/drone-dapper:v0.4.2
environment:
BY: dapper
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
REPO:
from_secret: image_repo
ONLY_MANIFEST: true
CROSS: true
commands:
- make all deploy only
volumes:
- name: docker
path: /var/run/docker.sock
- name: release-note
image: maiwj/drone-releaser:v0.1.0
commands:
- /changelog.sh
volumes:
- name: release-note
path: /release-note
- name: release
image: maiwj/drone-releaser:v0.1.0
settings:
api_key:
from_secret: github_token
files:
- "dist/octopus_*.yaml"
- "adaptors/*/dist/octopus_*.yaml"
prerelease: true
volumes:
- name: release-note
path: /release-note
when:
event:
exclude:
- push
volumes:
- name: docker
host:
path: /var/run/docker.sock
- name: release-note
temp: {}
trigger:
ref:
include:
- "refs/heads/master"
- "refs/heads/release/v*"
- "refs/tags/v*"
event:
include:
- push
- tag
node:
instance: agent-amd64
depends_on:
- build-linux-amd64
- build-linux-arm64
- build-linux-arm
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Treat all Go files in this repo as binary, with no git magic updating
# line endings. Windows users contributing to Go will need to use a
# modern version of git and editors capable of LF line endings.

*.go -text diff=golang
Loading

0 comments on commit c2ed83b

Please sign in to comment.