Skip to content

Commit

Permalink
ci: update to the latest release pipeline (#12075)
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney authored Feb 28, 2024
1 parent e3f2500 commit c132711
Show file tree
Hide file tree
Showing 17 changed files with 2,694 additions and 60 deletions.
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": "v1.11.5"
}
],
"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": "09374df9ca39fa58ec93d9e3fad4da1593186039",
"sum": "eMlN1tvu1jxKTdWvNfmXESn7JI+Wfu2C1wCabo7P2VQ="
}
],
"legacyImports": false
}
91 changes: 91 additions & 0 deletions .github/release-workflows.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
local lokiRelease = import 'workflows/main.jsonnet';
local build = lokiRelease.build;
local job = lokiRelease.job;

local releaseLibRef = std.filter(
function(dep) dep.source.git.remote == 'https://github.com/grafana/loki-release.git',
(import 'jsonnetfile.json').dependencies
)[0].version;

local checkTemplate = 'grafana/loki-release/.github/workflows/check.yml@%s' % releaseLibRef;

local imageJobs = {
loki: build.image('loki', 'cmd/loki'),
fluentd: build.image('fluent-plugin-loki', 'clients/cmd/fluentd', platform=['linux/amd64']),
'fluent-bit': build.image('fluent-bit-plugin-loki', 'clients/cmd/fluent-bit', platform=['linux/amd64']),
logstash: build.image('logstash-output-loki', 'clients/cmd/logstash', platform=['linux/amd64']),
logcli: build.image('logcli', 'cmd/logcli'),
'loki-canary': build.image('loki-canary', 'cmd/loki-canary'),
'loki-operator': build.image('loki-operator', 'operator', context='release/operator', platform=['linux/amd64']),
promtail: build.image('promtail', 'clients/cmd/promtail'),
querytee: build.image('loki-query-tee', 'cmd/querytee', platform=['linux/amd64']),
};

local buildImage = 'grafana/loki-build-image:0.30.1';
local golangCiLintVersion = 'v1.51.2';

{
'patch-release-pr.yml': std.manifestYamlDoc(
lokiRelease.releasePRWorkflow(
imageJobs=imageJobs,
buildImage=buildImage,
branches=['release-[0-9]+.[0-9]+.x'],
checkTemplate=checkTemplate,
golangCiLintVersion=golangCiLintVersion,
imagePrefix='grafana',
releaseLibRef=releaseLibRef,
releaseRepo='grafana/loki',
skipArm=false,
skipValidation=false,
versioningStrategy='always-bump-patch',
useGitHubAppToken=true,
), false, false
),
'minor-release-pr.yml': std.manifestYamlDoc(
lokiRelease.releasePRWorkflow(
imageJobs=imageJobs,
buildImage=buildImage,
branches=['k[0-9]+'],
checkTemplate=checkTemplate,
golangCiLintVersion=golangCiLintVersion,
imagePrefix='grafana',
releaseLibRef=releaseLibRef,
releaseRepo='grafana/loki',
skipArm=false,
skipValidation=false,
versioningStrategy='always-bump-minor',
useGitHubAppToken=true,
), false, false
),
'release.yml': std.manifestYamlDoc(
lokiRelease.releaseWorkflow(
branches=['release-[0-9]+.[0-9]+.x', 'k[0-9]+'],
getDockerCredsFromVault=true,
imagePrefix='grafana',
releaseLibRef=releaseLibRef,
releaseRepo='grafana/loki',
useGitHubAppToken=false,
), false, false
),
'check.yml': std.manifestYamlDoc({
name: 'check',
on: {
pull_request: {},
push: {
branches: ['main'],
},
},
jobs: {
check: {
uses: 'grafana/loki-release/.github/workflows/check.yml@%s' % releaseLibRef,
with: {
build_image: buildImage,
golang_ci_lint_version: golangCiLintVersion,
release_lib_ref: releaseLibRef,
skip_validation: false,
use_github_app_token: true,
},
},
},
}),
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c132711

Please sign in to comment.