Skip to content

Commit

Permalink
Build querytee image as part of CI pipeline (#5700)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
  • Loading branch information
chaudum authored Mar 25, 2022
1 parent 1a7b170 commit 95bf759
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,30 @@ local promtail_win() = pipeline('promtail-windows') {
],
};

local querytee() = pipeline('querytee-amd64') + arch_image('amd64', 'main') {
steps+: [
// dry run for everything that is not tag or main
docker('amd64', 'querytee') {
depends_on: ['image-tag'],
when: condition('exclude').tagMain,
settings+: {
dry_run: true,
repo: 'grafana/querytee',
},
},
] + [
// publish for tag or main
docker('amd64', 'querytee') {
depends_on: ['image-tag'],
when: condition('include').tagMain,
settings+: {
repo: 'grafana/querytee',
},
},
],
depends_on: ['check'],
};

local fluentbit() = pipeline('fluent-bit-amd64') + arch_image('amd64', 'main') {
steps+: [
// dry run for everything that is not tag or main
Expand Down Expand Up @@ -404,6 +428,7 @@ local manifest(apps) = pipeline('manifest') {
fluentbit(),
fluentd(),
logstash(),
querytee(),
] + [
manifest(['promtail', 'loki', 'loki-canary']) {
trigger: condition('include').tagMain {
Expand Down
58 changes: 57 additions & 1 deletion .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,62 @@ trigger:
- pull_request
---
depends_on:
- check
kind: pipeline
name: querytee-amd64
platform:
arch: amd64
os: linux
steps:
- commands:
- apk add --no-cache bash git
- git fetch origin --tags
- echo $(./tools/image-tag)-amd64 > .tags
- echo ",main" >> .tags
image: alpine
name: image-tag
- depends_on:
- image-tag
image: plugins/docker
name: build-querytee-image
settings:
dockerfile: cmd/querytee/Dockerfile
dry_run: true
password:
from_secret: docker_password
repo: grafana/querytee
username:
from_secret: docker_username
when:
ref:
exclude:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
- depends_on:
- image-tag
image: plugins/docker
name: publish-querytee-image
settings:
dockerfile: cmd/querytee/Dockerfile
dry_run: false
password:
from_secret: docker_password
repo: grafana/querytee
username:
from_secret: docker_username
when:
ref:
include:
- refs/heads/main
- refs/heads/k??
- refs/tags/v*
trigger:
event:
- push
- pull_request
---
depends_on:
- docker-amd64
- docker-arm64
- docker-arm
Expand Down Expand Up @@ -1045,6 +1101,6 @@ kind: secret
name: deploy_config
---
kind: signature
hmac: c8daf173159729445944aec4a308e53263b9302e485bca9d26f71ef2ac47ce4b
hmac: d46edb356841403724d7a261f095fcbaf22e0e077e35e9b2e4c8bbad7aa4b77e

...

0 comments on commit 95bf759

Please sign in to comment.