Skip to content

Commit

Permalink
Start to integrate implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
tboerger committed Sep 24, 2018
1 parent 2003314 commit 214e2ab
Show file tree
Hide file tree
Showing 41 changed files with 3,196 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .bra.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[run]
watch_all = true
watch_dirs = ["cmd", "pkg"]
watch_exts = [".go"]
ignore = [".git", "bin", "dist"]
ignore_files = []
build_delay = 1500
interrupt_timout = 15
graceful_kill = false

init_cmds = [
["make", "build"],
[
"./bin/prometheus-scw-sd",
"--log.pretty",
"--log.level",
"debug",
"server"
]
]

cmds = [
["make", "build"],
[
"./bin/prometheus-scw-sd",
"--log.pretty",
"--log.level",
"debug",
"server"
]
]
3 changes: 3 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exclude_paths:
- _tools/**
- vendor/**
Empty file added .dockerignore
Empty file.
284 changes: 284 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
workspace:
base: /srv/app
path: src/github.com/promhippie/prometheus-scw-sd

branches:
- master

pipeline:
cache-restore:
image: plugins/s3-cache:1
pull: true
secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
restore: true
when:
local: false

app-prepare:
image: webhippie/golang:edge
pull: true
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make clean
- make retool
- make sync
- make generate

app-vet:
image: webhippie/golang:edge
pull: true
group: cli
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make vet

app-check:
image: webhippie/golang:edge
pull: true
group: cli
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make megacheck

app-lint:
image: webhippie/golang:edge
pull: true
group: cli
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make lint

app-test:
image: webhippie/golang:edge
pull: true
group: cli
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make test

app-build:
image: webhippie/golang:edge
pull: true
group: cli
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make build

app-windows:
image: karalabe/xgo-latest:latest
pull: true
group: release
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make release-dirs release-windows
when:
event: [ push, tag ]

app-linux:
image: karalabe/xgo-latest:latest
pull: true
group: release
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make release-dirs release-linux
when:
event: [ push, tag ]

app-darwin:
image: karalabe/xgo-latest:latest
pull: true
group: release
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make release-dirs release-darwin
when:
event: [ push, tag ]

app-finish:
image: webhippie/golang:edge
pull: true
environment:
- CGO_ENABLED=0
- GOPATH=/srv/app
- TAGS=
commands:
- make release-copy release-check
when:
event: [ push, tag ]

app-gpgsign:
image: plugins/gpgsign:1
pull: true
secrets: [ gpgsign_key, gpgsign_passphrase ]
detach_sign: true
files:
- dist/release/*
excludes:
- dist/release/*.sha256
when:
event: [ push, tag ]

docker-amd64:
image: plugins/docker:17.05
pull: true
group: docker
secrets: [ docker_username, docker_password ]
repo: promhippie/prometheus-scw-sd
dockerfile: docker/Dockerfile.linux.amd64
auto_tag: true
auto_tag_suffix: linux-amd64
when:
event: [ push, tag ]

docker-i386:
image: plugins/docker:17.05
pull: true
group: docker
secrets: [ docker_username, docker_password ]
repo: promhippie/prometheus-scw-sd
dockerfile: docker/Dockerfile.linux.i386
auto_tag: true
auto_tag_suffix: linux-i386
when:
event: [ push, tag ]

docker-arm64v8:
image: plugins/docker:17.05
pull: true
group: docker
secrets: [ docker_username, docker_password ]
repo: promhippie/prometheus-scw-sd
dockerfile: docker/Dockerfile.linux.arm64v8
auto_tag: true
auto_tag_suffix: linux-arm64v8
when:
event: [ push, tag ]

docker-arm32v7:
image: plugins/docker:17.05
pull: true
group: docker
secrets: [ docker_username, docker_password ]
repo: promhippie/prometheus-scw-sd
dockerfile: docker/Dockerfile.linux.arm32v7
auto_tag: true
auto_tag_suffix: linux-arm32v7
when:
event: [ push, tag ]

docker-arm32v6:
image: plugins/docker:17.05
pull: true
group: docker
secrets: [ docker_username, docker_password ]
repo: promhippie/prometheus-scw-sd
dockerfile: docker/Dockerfile.linux.arm32v6
auto_tag: true
auto_tag_suffix: linux-arm32v6
when:
event: [ push, tag ]

docker-manifests:
image: plugins/manifest:1
pull: true
secrets: [ docker_username, docker_password ]
spec: manifest.tmpl
auto_tag: true
ignore_missing: true
when:
event: [ push, tag ]

docker-microbadger:
image: plugins/webhook:1
pull: true
secrets:
- source: microbadger_token
target: plugin_urls
when:
event: [ push, tag ]

cache-rebuild:
image: plugins/s3-cache:1
pull: true
secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
rebuild: true
mount:
- _tools
- vendor
when:
local: false
event: [ push ]

cache-flush:
image: plugins/s3-cache:1
pull: true
secrets: [ cache_s3_endpoint, cache_s3_access_key, cache_s3_secret_key ]
flush: true
flush_age: 14
when:
local: false
event: [ push ]

docs-build:
image: webhippie/hugo:latest
pull: true
commands:
- make docs
when:
local: false
event: [ push ]

docs-publish:
image: plugins/gh-pages:1
pull: true
secrets: [ github_username, github_password ]
pages_directory: docs/public/
temporary_base: tmp/
when:
local: false
event: [ push ]

github-release:
image: plugins/github-release:1
pull: true
secrets: [ github_token ]
files:
- dist/release/*
when:
event: [ tag ]

notify-matrix:
image: plugins/matrix:1
pull: true
secrets: [ matrix_roomid, matrix_username, matrix_password ]
when:
local: false
event: [ push, tag ]
status: [ changed, failure ]
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
indent_size = 4

[*.go]
indent_style = tab
indent_size = 4

[*.md]
trim_trailing_whitespace = true
9 changes: 9 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- PLEASE READ BEFORE DELETING
Please write English, this is the language everybody of us understands. Take a
moment to search that an issue doesn't already exist If you only got questions
please head over to our Matrix channel:
https://matrix.to/#/#webhippie:matrix.org
-->
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- PLEASE READ BEFORE DELETING
Make sure to target the master branch, describe what your pull requests does and
which issue you are solving (if any). Please read our contributing guidelines as
well:
https://github.com/promhippie/prometheus-scw-sd/blob/master/CONTRIBUTING.md
-->
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof

coverage.out

/_tools
/vendor
/bin
/dist

.envrc
scw.json
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
Loading

0 comments on commit 214e2ab

Please sign in to comment.