Skip to content

Commit

Permalink
Merge pull request grafana#99 from grafana/main
Browse files Browse the repository at this point in the history
Update from upstream repository
  • Loading branch information
periklis authored Jan 18, 2023
2 parents 577622b + f24da4a commit 3f972ed
Show file tree
Hide file tree
Showing 733 changed files with 38,095 additions and 11,746 deletions.
40 changes: 36 additions & 4 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ local make(target, container=true, args=[]) = run(target, [

local docker(arch, app) = {
name: '%s-image' % if $.settings.dry_run then 'build-' + app else 'publish-' + app,
image: 'plugins/docker',
image: if arch == 'arm' then 'plugins/docker:linux-arm' else 'plugins/docker',
settings: {
repo: 'grafana/%s' % app,
dockerfile: 'cmd/%s/Dockerfile' % app,
Expand All @@ -74,7 +74,7 @@ local docker(arch, app) = {

local clients_docker(arch, app) = {
name: '%s-image' % if $.settings.dry_run then 'build-' + app else 'publish-' + app,
image: 'plugins/docker',
image: if arch == 'arm' then 'plugins/docker:linux-arm' else 'plugins/docker',
settings: {
repo: 'grafana/%s' % app,
dockerfile: 'clients/cmd/%s/Dockerfile' % app,
Expand All @@ -86,7 +86,7 @@ local clients_docker(arch, app) = {

local docker_operator(arch, operator) = {
name: '%s-image' % if $.settings.dry_run then 'build-' + operator else 'publish-' + operator,
image: 'plugins/docker',
image: if arch == 'arm' then 'plugins/docker:linux-arm' else 'plugins/docker',
settings: {
repo: 'grafana/%s' % operator,
context: 'operator',
Expand Down Expand Up @@ -446,7 +446,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {

[
pipeline('loki-build-image') {
local build_image_tag = '0.25.0',
local build_image_tag = '0.27.0',
workspace: {
base: '/src',
path: 'loki',
Expand Down Expand Up @@ -758,6 +758,38 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
}) { when: { event: ['tag'] } },
],
},
pipeline('docker-driver') {
trigger+: onTagOrMain,
steps: [
{
name: 'build and push',
image: 'grafana/loki-build-image:%s' % build_image_version,
depends_on: ['clone'],
environment: {
DOCKER_USERNAME: { from_secret: docker_username_secret.name },
DOCKER_PASSWORD: { from_secret: docker_password_secret.name },
},
commands: [
'make docker-driver-push',
],
volumes: [
{
name: 'docker',
path: '/var/run/docker.sock',
},
],
privileged: true,
},
],
volumes: [
{
name: 'docker',
host: {
path: '/var/run/docker.sock',
},
},
],
},
]
+ [
lambda_promtail(arch)
Expand Down
94 changes: 63 additions & 31 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ steps:
dry_run: true
repo: grafana/loki-build-image
tags:
- 0.25.0
- 0.27.0
when:
event:
- pull_request
Expand All @@ -26,7 +26,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.25.0
- 0.27.0
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -93,14 +93,14 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: check-drone-drift
- commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: check-generated-files
- commands:
- cd ..
Expand All @@ -110,7 +110,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: clone-target-branch
when:
event:
Expand All @@ -121,15 +121,15 @@ steps:
- clone-target-branch
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: test
- commands:
- cd ../loki-target-branch
- BUILD_IN_CONTAINER=false make test
depends_on:
- clone-target-branch
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: test-target-branch
when:
event:
Expand All @@ -142,7 +142,7 @@ steps:
- test
- test-target-branch
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: compare-coverage
when:
event:
Expand All @@ -158,7 +158,7 @@ steps:
TOKEN:
from_secret: github_token
USER: grafanabot
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: report-coverage
when:
event:
Expand All @@ -168,15 +168,15 @@ steps:
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: lint
- commands:
- make BUILD_IN_CONTAINER=false check-mod
depends_on:
- test
- lint
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: check-mod
- commands:
- apk add make bash && make lint-scripts
Expand All @@ -187,28 +187,28 @@ steps:
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: loki
- commands:
- make BUILD_IN_CONTAINER=false check-doc
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: check-doc
- commands:
- make BUILD_IN_CONTAINER=false validate-example-configs
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: validate-example-configs
- commands:
- make BUILD_IN_CONTAINER=false check-example-config-doc
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: check-example-config-doc
trigger:
ref:
Expand All @@ -235,7 +235,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: loki-mixin-check
when:
event:
Expand All @@ -260,7 +260,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: documentation-helm-reference-check
trigger:
ref:
Expand Down Expand Up @@ -516,7 +516,7 @@ steps:
name: image-tag
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: build-loki-image
settings:
dockerfile: cmd/loki/Dockerfile
Expand All @@ -531,7 +531,7 @@ steps:
- pull_request
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: build-loki-canary-image
settings:
dockerfile: cmd/loki-canary/Dockerfile
Expand All @@ -546,7 +546,7 @@ steps:
- pull_request
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: build-logcli-image
settings:
dockerfile: cmd/logcli/Dockerfile
Expand All @@ -561,7 +561,7 @@ steps:
- pull_request
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: publish-loki-image
settings:
dockerfile: cmd/loki/Dockerfile
Expand All @@ -577,7 +577,7 @@ steps:
- tag
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: publish-loki-canary-image
settings:
dockerfile: cmd/loki-canary/Dockerfile
Expand All @@ -593,7 +593,7 @@ steps:
- tag
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: publish-logcli-image
settings:
dockerfile: cmd/logcli/Dockerfile
Expand Down Expand Up @@ -734,7 +734,7 @@ steps:
name: image-tag
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: build-promtail-image
settings:
dockerfile: clients/cmd/promtail/Dockerfile.arm32
Expand All @@ -749,7 +749,7 @@ steps:
- pull_request
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: publish-promtail-image
settings:
dockerfile: clients/cmd/promtail/Dockerfile.arm32
Expand Down Expand Up @@ -894,7 +894,7 @@ steps:
name: image-tag
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: build-loki-operator-image
settings:
context: operator
Expand All @@ -910,7 +910,7 @@ steps:
- pull_request
- depends_on:
- image-tag
image: plugins/docker
image: plugins/docker:linux-arm
name: publish-loki-operator-image
settings:
context: operator
Expand Down Expand Up @@ -1360,15 +1360,15 @@ steps:
NFPM_SIGNING_KEY:
from_secret: gpg_private_key
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: write-key
- commands:
- make BUILD_IN_CONTAINER=false packages
environment:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: test packaging
- commands:
- ./tools/packaging/verify-deb-install.sh
Expand All @@ -1394,7 +1394,7 @@ steps:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.26.0
image: grafana/loki-build-image:0.27.0
name: publish
when:
event:
Expand All @@ -1416,6 +1416,38 @@ volumes:
path: /var/run/docker.sock
name: docker
---
kind: pipeline
name: docker-driver
steps:
- commands:
- make docker-driver-push
depends_on:
- clone
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
image: grafana/loki-build-image:0.27.0
name: build and push
privileged: true
volumes:
- name: docker
path: /var/run/docker.sock
trigger:
event:
- push
- tag
ref:
- refs/heads/main
- refs/heads/k???
- refs/tags/v*
- refs/pull/*/head
volumes:
- host:
path: /var/run/docker.sock
name: docker
---
depends_on:
- check
kind: pipeline
Expand Down Expand Up @@ -1633,6 +1665,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: b07d95d16c5f0170c2f5c16a7b73a73b5c3989b531bf4a79e8487166cc8bf77b
hmac: 768eb915af5b1cf14a24de3d4a2bbf9ed583404d7a391468d4d8e26b2b65b06c

...
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Fixes #<issue number>
**Special notes for your reviewer**:

**Checklist**
- [ ] Reviewed the `CONTRIBUTING.md` guide
- [ ] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
Expand Down
Loading

0 comments on commit 3f972ed

Please sign in to comment.