Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(fix-action-names-in-main): release 2.9.5 #11940

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
43a9adb
fix: release action repo reference
trevorwhitney Jan 26, 2024
361d922
chore: vendor jsonnet dependencies
trevorwhitney Feb 13, 2024
43dd231
feat: latest release process supports prereleases
trevorwhitney Feb 13, 2024
663aeac
feat: add conventional commit PR title checker
trevorwhitney Feb 13, 2024
c8ad24a
Merge branch 'main' into fix-action-names-in-main
trevorwhitney Feb 13, 2024
b72d115
feat: add golangci-lint to pr checks
trevorwhitney Feb 13, 2024
8dcdeed
chore: test release pipeline on this branch
trevorwhitney Feb 13, 2024
ceafa1b
feat: use loki build image
trevorwhitney Feb 13, 2024
859dbb4
chore: run release pipeline on branch
trevorwhitney Feb 13, 2024
e6a4d5d
chore: manually install shellcheck
trevorwhitney Feb 13, 2024
ed6950d
fix: manually install jsonnetfmt
trevorwhitney Feb 13, 2024
3944032
chore: install xz-utils
trevorwhitney Feb 13, 2024
3e03785
chore: try GITHUB_TOKEN
trevorwhitney Feb 13, 2024
7442200
chore: try new token (and skip validation for now)
trevorwhitney Feb 13, 2024
02b95ed
feat: extract version for dist step
trevorwhitney Feb 13, 2024
56561ee
feat: attempt arm builds again
trevorwhitney Feb 14, 2024
5683d3a
feat: update to latest loki-release from main
trevorwhitney Feb 14, 2024
365d405
Merge branch 'main' into fix-action-names-in-main
trevorwhitney Feb 14, 2024
6a1d4eb
feat: add packaging
trevorwhitney Feb 14, 2024
74c6c80
fix: bundle dist and packaging to save duplication
trevorwhitney Feb 14, 2024
71db0de
feat: remove check steps from drone
trevorwhitney Feb 14, 2024
0eae0ce
fix: bring in latest release code for packaging
trevorwhitney Feb 15, 2024
4620bd0
feat: used shared workflow for running checks
trevorwhitney Feb 15, 2024
f3b9583
chore: bump latest loki-release
trevorwhitney Feb 15, 2024
c2110bb
chore: only bring in workflow jsonnet from loki-release
trevorwhitney Feb 15, 2024
85a1bff
fix: dubious ownership during dist
trevorwhitney Feb 15, 2024
8f4917d
chore: try to fix incorrect footer issue
trevorwhitney Feb 15, 2024
b3c630d
fix: missing drone dependency
trevorwhitney Feb 15, 2024
293a79a
chore(fix-action-names-in-main): release 2.9.5
grafanabot Feb 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 1 addition & 115 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -601,30 +601,19 @@ local build_image_tag = '0.33.0';
path: 'loki',
},
steps: [
make('check-drone-drift', container=false) { depends_on: ['clone'] },
make('check-generated-files', container=false) { depends_on: ['clone'] },
run('clone-target-branch', commands=[
'cd ..',
'echo "cloning "$DRONE_TARGET_BRANCH ',
'git clone -b $DRONE_TARGET_BRANCH $CI_REPO_REMOTE loki-target-branch',
'cd -',
]) { depends_on: ['clone'], when: onPRs },
make('test', container=false) { depends_on: ['clone-target-branch', 'check-generated-files'] },
make('lint', container=false) { depends_on: ['check-generated-files'] },
make('check-mod', container=false) { depends_on: ['test', 'lint'] },
{
name: 'shellcheck',
image: 'koalaman/shellcheck-alpine:stable',
commands: ['apk add make bash && make lint-scripts'],
},
make('loki', container=false) { depends_on: ['check-generated-files'] },
make('check-doc', container=false) { depends_on: ['loki'] },
make('loki', container=false) { depends_on: ['check-generated-files'] },
make('check-format', container=false, args=[
'GIT_TARGET_BRANCH="$DRONE_TARGET_BRANCH"',
]) { depends_on: ['loki'], when: onPRs },
make('validate-example-configs', container=false) { depends_on: ['loki'] },
make('validate-dev-cluster-config', container=false) { depends_on: ['validate-example-configs'] },
make('check-example-config-doc', container=false) { depends_on: ['clone'] },
{
name: 'build-docs-website',
image: 'grafana/docs-base:e6ef023f8b8',
Expand Down Expand Up @@ -818,109 +807,6 @@ local build_image_tag = '0.33.0';
},
promtail_win(),
logql_analyzer(),
pipeline('release') {
trigger+: {
event: ['pull_request', 'tag'],
},
depends_on+: ['check'],
image_pull_secrets: [pull_secret.name],
volumes+: [
{
name: 'cgroup',
host: {
path: '/sys/fs/cgroup',
},
},
{
name: 'docker',
host: {
path: '/var/run/docker.sock',
},
},
],
// Launch docker images with systemd
services: [
{
name: 'systemd-debian',
image: 'jrei/systemd-debian:12',
volumes: [
{
name: 'cgroup',
path: '/sys/fs/cgroup',
},
],
privileged: true,
},
{
name: 'systemd-centos',
image: 'jrei/systemd-centos:8',
volumes: [
{
name: 'cgroup',
path: '/sys/fs/cgroup',
},
],
privileged: true,
},
],
// Package and test the packages
steps: [
skipMissingSecretPipelineStep(gpg_private_key.name), // Needs GPG keys to run
{
name: 'fetch-tags',
image: 'alpine',
commands: [
'apk add --no-cache bash git',
'git fetch origin --tags',
],
},
run('write-key',
commands=['printf "%s" "$NFPM_SIGNING_KEY" > $NFPM_SIGNING_KEY_FILE'],
env={
NFPM_SIGNING_KEY: { from_secret: gpg_private_key.name },
NFPM_SIGNING_KEY_FILE: '/drone/src/private-key.key',
}),
run('test packaging',
commands=[
'make BUILD_IN_CONTAINER=false packages',
],
env={
NFPM_PASSPHRASE: { from_secret: gpg_passphrase.name },
NFPM_SIGNING_KEY_FILE: '/drone/src/private-key.key',
}),
{
name: 'test deb package',
image: 'docker',
commands: ['./tools/packaging/verify-deb-install.sh'],
volumes: [
{
name: 'docker',
path: '/var/run/docker.sock',
},
],
privileged: true,
},
{
name: 'test rpm package',
image: 'docker',
commands: ['./tools/packaging/verify-rpm-install.sh'],
volumes: [
{
name: 'docker',
path: '/var/run/docker.sock',
},
],
privileged: true,
},
run('publish',
commands=['make BUILD_IN_CONTAINER=false publish'],
env={
GITHUB_TOKEN: { from_secret: github_secret.name },
NFPM_PASSPHRASE: { from_secret: gpg_passphrase.name },
NFPM_SIGNING_KEY_FILE: '/drone/src/private-key.key',
}) { when: { event: ['tag'] } },
],
},
pipeline('docker-driver') {
trigger+: onTagOrMain,
steps: [
Expand Down
153 changes: 4 additions & 149 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,6 @@ workspace:
kind: pipeline
name: check
steps:
- commands:
- make BUILD_IN_CONTAINER=false check-drone-drift
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-drone-drift
- commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
Expand All @@ -205,46 +198,19 @@ steps:
event:
- pull_request
- commands:
- make BUILD_IN_CONTAINER=false test
depends_on:
- clone-target-branch
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.33.0
name: test
- commands:
- make BUILD_IN_CONTAINER=false lint
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.33.0
name: lint
- commands:
- make BUILD_IN_CONTAINER=false check-mod
- make BUILD_IN_CONTAINER=false check-doc
depends_on:
- test
- lint
- loki
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-mod
- commands:
- apk add make bash && make lint-scripts
image: koalaman/shellcheck-alpine:stable
name: shellcheck
name: check-doc
- commands:
- make BUILD_IN_CONTAINER=false loki
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.33.0
name: loki
- commands:
- make BUILD_IN_CONTAINER=false check-doc
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-doc
- commands:
- make BUILD_IN_CONTAINER=false check-format GIT_TARGET_BRANCH="$DRONE_TARGET_BRANCH"
depends_on:
Expand All @@ -255,27 +221,13 @@ steps:
when:
event:
- pull_request
- commands:
- make BUILD_IN_CONTAINER=false validate-example-configs
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.33.0
name: validate-example-configs
- commands:
- make BUILD_IN_CONTAINER=false validate-dev-cluster-config
depends_on:
- validate-example-configs
environment: {}
image: grafana/loki-build-image:0.33.0
name: validate-dev-cluster-config
- commands:
- make BUILD_IN_CONTAINER=false check-example-config-doc
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.0
name: check-example-config-doc
- commands:
- mkdir -p /hugo/content/docs/loki/latest
- cp -r docs/sources/* /hugo/content/docs/loki/latest/
Expand Down Expand Up @@ -1697,103 +1649,6 @@ trigger:
- refs/tags/v*
- refs/pull/*/head
---
depends_on:
- check
image_pull_secrets:
- dockerconfigjson
kind: pipeline
name: release
services:
- image: jrei/systemd-debian:12
name: systemd-debian
privileged: true
volumes:
- name: cgroup
path: /sys/fs/cgroup
- image: jrei/systemd-centos:8
name: systemd-centos
privileged: true
volumes:
- name: cgroup
path: /sys/fs/cgroup
steps:
- commands:
- if [ "$${#TEST_SECRET}" -eq 0 ]; then
- ' echo "Missing a secret to run this pipeline. This branch needs to be re-pushed
as a branch in main grafana/loki repository in order to run." && exit 78'
- fi
environment:
TEST_SECRET:
from_secret: gpg_private_key
image: alpine
name: skip pipeline if missing secret
- commands:
- apk add --no-cache bash git
- git fetch origin --tags
image: alpine
name: fetch-tags
- commands:
- printf "%s" "$NFPM_SIGNING_KEY" > $NFPM_SIGNING_KEY_FILE
environment:
NFPM_SIGNING_KEY:
from_secret: gpg_private_key
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.33.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.33.0
name: test packaging
- commands:
- ./tools/packaging/verify-deb-install.sh
image: docker
name: test deb package
privileged: true
volumes:
- name: docker
path: /var/run/docker.sock
- commands:
- ./tools/packaging/verify-rpm-install.sh
image: docker
name: test rpm package
privileged: true
volumes:
- name: docker
path: /var/run/docker.sock
- commands:
- make BUILD_IN_CONTAINER=false publish
environment:
GITHUB_TOKEN:
from_secret: github_token
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.33.0
name: publish
when:
event:
- tag
trigger:
event:
- pull_request
- tag
ref:
- refs/heads/main
- refs/heads/k???
- refs/tags/v*
- refs/pull/*/head
volumes:
- host:
path: /sys/fs/cgroup
name: cgroup
- host:
path: /var/run/docker.sock
name: docker
---
kind: pipeline
name: docker-driver
steps:
Expand Down Expand Up @@ -2072,6 +1927,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 51861919f0ba5370a152bdb9267828c742f2042819fb01388c6d23bf44e3cbb7
hmac: b098779af60b423c7c8b05a7228438e83766f42655c2291c2f61da73e17e4ff2

...
15 changes: 15 additions & 0 deletions .github/jsonnetfile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": 1,
"dependencies": [
{
"source": {
"git": {
"remote": "https://github.com/grafana/loki-release.git",
"subdir": "workflows"
}
},
"version": "release-1.10.x"
}
],
"legacyImports": true
}
16 changes: 16 additions & 0 deletions .github/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": 1,
"dependencies": [
{
"source": {
"git": {
"remote": "https://github.com/grafana/loki-release.git",
"subdir": "workflows"
}
},
"version": "9059058eeb289be54d39f6ee59a8c5435b44201a",
"sum": "aIjj776nO0Z5mDRXTkP4OlySCde7S8/62kP6NCKHd+U="
}
],
"legacyImports": false
}
Loading
Loading