Skip to content

Commit

Permalink
Merge pull request grafana#105 from grafana/main
Browse files Browse the repository at this point in the history
Update from upstream repository
  • Loading branch information
periklis authored Jan 31, 2023
2 parents 2d9021e + c638d92 commit 462ee63
Show file tree
Hide file tree
Showing 833 changed files with 81,766 additions and 21,203 deletions.
13 changes: 12 additions & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {

[
pipeline('loki-build-image') {
local build_image_tag = '0.27.0',
local build_image_tag = '0.27.1',
workspace: {
base: '/src',
path: 'loki',
Expand Down Expand Up @@ -533,6 +533,8 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
'> diff.txt',
]) { depends_on: ['test', 'test-target-branch'], when: onPRs },
run('report-coverage', commands=[
"total_diff=$(sed 's/%//' diff.txt | awk '{sum+=$3;}END{print sum;}')",
'if [ $total_diff = 0 ]; then exit 0; fi',
"pull=$(echo $CI_COMMIT_REF | awk -F '/' '{print $3}')",
"body=$(jq -Rs '{body: . }' diff.txt)",
'curl -X POST -u $USER:$TOKEN -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/grafana/loki/issues/$pull/comments -d "$body" > /dev/null',
Expand All @@ -551,6 +553,15 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
make('check-doc', container=false) { depends_on: ['loki'] },
make('validate-example-configs', container=false) { depends_on: ['loki'] },
make('check-example-config-doc', container=false) { depends_on: ['clone'] },
{
name: 'build-docs-website',
image: 'grafana/docs-base:latest',
commands: [
'mkdir -p /hugo/content/docs/loki/latest',
'cp -r docs/sources/* /hugo/content/docs/loki/latest/',
'cd /hugo && make prod',
],
},
],
},
pipeline('mixins') {
Expand Down
52 changes: 30 additions & 22 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.27.0
- 0.27.1
when:
event:
- pull_request
Expand All @@ -26,7 +26,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.27.0
- 0.27.1
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.27.0
image: grafana/loki-build-image:0.27.1
name: check-drone-drift
- commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: check-generated-files
- commands:
- cd ..
Expand All @@ -110,7 +110,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
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.27.0
image: grafana/loki-build-image:0.27.1
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.27.0
image: grafana/loki-build-image:0.27.1
name: test-target-branch
when:
event:
Expand All @@ -142,12 +142,14 @@ steps:
- test
- test-target-branch
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: compare-coverage
when:
event:
- pull_request
- commands:
- total_diff=$(sed 's/%//' diff.txt | awk '{sum+=$3;}END{print sum;}')
- if [ $total_diff = 0 ]; then exit 0; fi
- pull=$(echo $CI_COMMIT_REF | awk -F '/' '{print $3}')
- 'body=$(jq -Rs ''{body: . }'' diff.txt)'
- 'curl -X POST -u $USER:$TOKEN -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/grafana/loki/issues/$pull/comments
Expand All @@ -158,7 +160,7 @@ steps:
TOKEN:
from_secret: github_token
USER: grafanabot
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: report-coverage
when:
event:
Expand All @@ -168,15 +170,15 @@ steps:
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: lint
- commands:
- make BUILD_IN_CONTAINER=false check-mod
depends_on:
- test
- lint
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: check-mod
- commands:
- apk add make bash && make lint-scripts
Expand All @@ -187,29 +189,35 @@ steps:
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: loki
- commands:
- make BUILD_IN_CONTAINER=false check-doc
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: check-doc
- commands:
- make BUILD_IN_CONTAINER=false validate-example-configs
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: validate-example-configs
- commands:
- make BUILD_IN_CONTAINER=false check-example-config-doc
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: check-example-config-doc
- commands:
- mkdir -p /hugo/content/docs/loki/latest
- cp -r docs/sources/* /hugo/content/docs/loki/latest/
- cd /hugo && make prod
image: grafana/docs-base:latest
name: build-docs-website
trigger:
ref:
- refs/heads/main
Expand All @@ -235,7 +243,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: loki-mixin-check
when:
event:
Expand All @@ -260,7 +268,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: documentation-helm-reference-check
trigger:
ref:
Expand Down Expand Up @@ -1362,15 +1370,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.27.0
image: grafana/loki-build-image:0.27.1
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.27.0
image: grafana/loki-build-image:0.27.1
name: test packaging
- commands:
- ./tools/packaging/verify-deb-install.sh
Expand All @@ -1396,7 +1404,7 @@ steps:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: publish
when:
event:
Expand Down Expand Up @@ -1430,7 +1438,7 @@ steps:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
image: grafana/loki-build-image:0.27.0
image: grafana/loki-build-image:0.27.1
name: build and push
privileged: true
volumes:
Expand Down Expand Up @@ -1667,6 +1675,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 58239f4ad12c6f5089ab3582f4086a6be2c3131778b71ddba9721b21fa03ce00
hmac: fbc93106cac3a989c4b910682f2e08eadc21786d8502f3270bc2f4a5b1996b21

...
6 changes: 3 additions & 3 deletions .github/workflows/issue_commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
run: npm install --production --prefix ./actions
- name: Run Commands
uses: ./actions/commands
with:
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
configPath: issue_commands
with:
token: ${{secrets.ISSUE_COMMANDS_TOKEN}}
configPath: issue_commands
2 changes: 1 addition & 1 deletion .github/workflows/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id: go
- uses: actions/checkout@v3.3.0
- name: Lint
uses: golangci/golangci-lint-action@v3.3.1
uses: golangci/golangci-lint-action@v3.4.0
with:
version: v1.50.0
args: --timeout=4m
Expand Down
Loading

0 comments on commit 462ee63

Please sign in to comment.