Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/.drone/drone.yml

969 lines
17 KiB

---
kind: pipeline
name: check
platform:
os: linux
arch: amd64
workspace:
base: /src
path: loki
steps:
- name: test
image: grafana/loki-build-image:0.15.0
commands:
- make BUILD_IN_CONTAINER=false test
depends_on:
- clone
- name: lint
image: grafana/loki-build-image:0.15.0
commands:
- make BUILD_IN_CONTAINER=false lint
depends_on:
- clone
- name: check-generated-files
image: grafana/loki-build-image:0.15.0
commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
- clone
- name: check-mod
image: grafana/loki-build-image:0.15.0
commands:
- make BUILD_IN_CONTAINER=false check-mod
depends_on:
- clone
- test
- lint
---
kind: pipeline
name: docker-amd64
platform:
os: linux
arch: amd64
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-amd64 > .tags
- name: build-loki-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/loki
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: build-loki-canary-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki-canary/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/loki-canary
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: build-logcli-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/logcli/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/logcli
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-loki-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki/Dockerfile
password:
from_secret: docker_password
repo: grafana/loki
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-loki-canary-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki-canary/Dockerfile
password:
from_secret: docker_password
repo: grafana/loki-canary
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-logcli-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/logcli/Dockerfile
password:
from_secret: docker_password
repo: grafana/logcli
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: docker-arm64
platform:
os: linux
arch: arm64
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-arm64 > .tags
- name: build-loki-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/loki
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: build-loki-canary-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki-canary/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/loki-canary
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: build-logcli-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/logcli/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/logcli
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-loki-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki/Dockerfile
password:
from_secret: docker_password
repo: grafana/loki
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-loki-canary-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki-canary/Dockerfile
password:
from_secret: docker_password
repo: grafana/loki-canary
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-logcli-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/logcli/Dockerfile
password:
from_secret: docker_password
repo: grafana/logcli
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: docker-arm
platform:
os: linux
arch: arm
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-arm > .tags
- name: build-loki-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/loki
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: build-loki-canary-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki-canary/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/loki-canary
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: build-logcli-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/logcli/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/logcli
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-loki-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki/Dockerfile
password:
from_secret: docker_password
repo: grafana/loki
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-loki-canary-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/loki-canary/Dockerfile
password:
from_secret: docker_password
repo: grafana/loki-canary
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-logcli-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: cmd/logcli/Dockerfile
password:
from_secret: docker_password
repo: grafana/logcli
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: promtail-amd64
platform:
os: linux
arch: amd64
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-amd64 > .tags
- name: build-promtail-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: clients/cmd/promtail/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/promtail
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-promtail-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: clients/cmd/promtail/Dockerfile
password:
from_secret: docker_password
repo: grafana/promtail
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: promtail-arm64
platform:
os: linux
arch: arm64
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-arm64 > .tags
- name: build-promtail-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: clients/cmd/promtail/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/promtail
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-promtail-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: clients/cmd/promtail/Dockerfile
password:
from_secret: docker_password
repo: grafana/promtail
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: promtail-arm
platform:
os: linux
arch: arm
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-arm > .tags
- name: build-promtail-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: clients/cmd/promtail/Dockerfile.arm32
dry_run: true
password:
from_secret: docker_password
repo: grafana/promtail
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-promtail-image
image: plugins/docker
settings:
build_args:
- TOUCH_PROTOS=1
dockerfile: clients/cmd/promtail/Dockerfile.arm32
password:
from_secret: docker_password
repo: grafana/promtail
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: fluent-bit-amd64
platform:
os: linux
arch: amd64
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-amd64 > .tags
- echo ",latest,main" >> .tags
- name: build-fluent-bit-image
image: plugins/docker
settings:
dockerfile: clients/cmd/fluent-bit/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/fluent-bit-plugin-loki
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-fluent-bit-image
image: plugins/docker
settings:
dockerfile: clients/cmd/fluent-bit/Dockerfile
password:
from_secret: docker_password
repo: grafana/fluent-bit-plugin-loki
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: fluentd-amd64
platform:
os: linux
arch: amd64
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-amd64 > .tags
- echo ",latest,main" >> .tags
- name: build-fluentd-image
image: plugins/docker
settings:
dockerfile: clients/cmd/fluentd/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/fluent-plugin-loki
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-fluentd-image
image: plugins/docker
settings:
dockerfile: clients/cmd/fluentd/Dockerfile
password:
from_secret: docker_password
repo: grafana/fluent-plugin-loki
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: logstash-amd64
platform:
os: linux
arch: amd64
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-amd64 > .tags
- echo ",latest,main" >> .tags
- name: build-logstash-image
image: plugins/docker
settings:
dockerfile: clients/cmd/logstash/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/logstash-output-loki
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
- name: publish-logstash-image
image: plugins/docker
settings:
dockerfile: clients/cmd/logstash/Dockerfile
password:
from_secret: docker_password
repo: grafana/logstash-output-loki
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- image-tag
depends_on:
- check
---
kind: pipeline
name: manifest
platform:
os: linux
arch: amd64
steps:
- name: manifest-promtail
image: plugins/manifest
settings:
password:
from_secret: docker_password
spec: .drone/docker-manifest.tmpl
target: promtail
username:
from_secret: docker_username
depends_on:
- clone
- name: manifest-loki
image: plugins/manifest
settings:
password:
from_secret: docker_password
spec: .drone/docker-manifest.tmpl
target: loki
username:
from_secret: docker_username
depends_on:
- clone
- manifest-promtail
- name: manifest-loki-canary
image: plugins/manifest
settings:
password:
from_secret: docker_password
spec: .drone/docker-manifest.tmpl
target: loki-canary
username:
from_secret: docker_username
depends_on:
- clone
- manifest-loki
trigger:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- docker-amd64
- docker-arm64
- docker-arm
- promtail-amd64
- promtail-arm64
- promtail-arm
---
kind: pipeline
name: deploy
platform:
os: linux
arch: amd64
steps:
- name: image-tag
image: alpine
commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag) > .tag
depends_on:
- clone
- name: trigger
image: us.gcr.io/kubernetes-dev/drone/plugins/deploy-image
settings:
docker_tag_file: .tag
github_token:
from_secret: github_token
images_json:
from_secret: deploy_config
depends_on:
- clone
- image-tag
image_pull_secrets:
- dockerconfigjson
trigger:
ref:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
depends_on:
- manifest
---
kind: pipeline
name: promtail-windows
platform:
os: windows
arch: amd64
version: 1809
steps:
- name: identify-runner
image: golang:windowsservercore-1809
commands:
- Write-Output $env:DRONE_RUNNER_NAME
- name: test
image: golang:windowsservercore-1809
commands:
- go test .\clients\pkg\promtail\targets\windows\... -v
---
kind: secret
name: github_token
get:
path: infra/data/ci/github/grafanabot
name: pat
---
kind: secret
name: dockerconfigjson
get:
path: secret/data/common/gcr
name: .dockerconfigjson
---
kind: secret
name: docker_username
get:
path: infra/data/ci/docker_hub
name: username
---
kind: secret
name: docker_password
get:
path: infra/data/ci/docker_hub
name: password
---
kind: secret
name: deploy_config
get:
path: infra/data/ci/loki/deploy
name: config.json
...