Skip to content

Commit

Permalink
ci: bump release code to allow for RELEASE_AS
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Mar 27, 2024
1 parent 5589e67 commit 929cd0f
Show file tree
Hide file tree
Showing 8 changed files with 966 additions and 65 deletions.
4 changes: 2 additions & 2 deletions .github/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"subdir": "workflows"
}
},
"version": "f1f89ced80154ade3b28f9ad9bd4541cdc79aae1",
"sum": "TQ2X5sm7o+BCrytzSbJ7Th2YqNZ2ZPx9Wg62x5mEVJ0="
"version": "c621c69d3b797329ced80672c834784d9a465864",
"sum": "et6CvaD2F57Y9+tK9XHqepGJoNerE6uOuCLvvYpger4="
}
],
"legacyImports": false
Expand Down
10 changes: 5 additions & 5 deletions .github/release-workflows.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ local imagePrefix = 'grafana';
name: 'Prepare Minor Release PR from Weekly',
}, false, false
),
'major-release-pr.yml': std.manifestYamlDoc(
'three-zero-release.yml': std.manifestYamlDoc(
lokiRelease.releasePRWorkflow(
branches=['main', 'add-major-release-workflow'],
buildImage=buildImage,
Expand All @@ -76,12 +76,12 @@ local imagePrefix = 'grafana';
imagePrefix=imagePrefix,
releaseLibRef=releaseLibRef,
releaseRepo='grafana/loki',
skipArm=true,
skipValidation=true,
skipArm=false,
skipValidation=false,
useGitHubAppToken=true,
versioningStrategy='default',
releaseAs='3.0.0-rc.1',
) + {
name: 'Prepare Major Release PR from main',
name: 'Prepare Loki 3.0 release',
}, false, false
),
'release.yml': std.manifestYamlDoc(
Expand Down

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

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

43 changes: 30 additions & 13 deletions .github/workflows/minor-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -768,19 +768,36 @@ jobs:
name: "get release version"
run: |
npm install
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ -z "${{ env.RELEASE_AS }}" ]]; then
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
else
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--release-as "${{ env.RELEASE_AS }}"
fi
cat release.json
Expand Down
43 changes: 30 additions & 13 deletions .github/workflows/patch-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -768,19 +768,36 @@ jobs:
name: "get release version"
run: |
npm install
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ -z "${{ env.RELEASE_AS }}" ]]; then
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
else
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--release-as "${{ env.RELEASE_AS }}"
fi
cat release.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ env:
DOCKER_USERNAME: "grafana"
DRY_RUN: false
IMAGE_PREFIX: "grafana"
RELEASE_AS: "3.0.0-rc.1"
RELEASE_LIB_REF: "main"
RELEASE_REPO: "grafana/loki"
SKIP_VALIDATION: true
SKIP_VALIDATION: false
USE_GITHUB_APP_TOKEN: true
VERSIONING_STRATEGY: "default"
VERSIONING_STRATEGY: "always-bump-patch"
jobs:
check:
uses: "grafana/loki-release/.github/workflows/check.yml@main"
with:
build_image: "grafana/loki-build-image:0.33.0"
golang_ci_lint_version: "v1.55.1"
release_lib_ref: "main"
skip_validation: true
skip_validation: false
use_github_app_token: true
create-release-pr:
needs:
Expand Down Expand Up @@ -124,7 +125,7 @@ jobs:
DRONE_TAG: "${{ needs.version.outputs.version }}"
IMAGE_TAG: "${{ needs.version.outputs.version }}"
NFPM_SIGNING_KEY_FILE: "nfpm-private-key.key"
SKIP_ARM: true
SKIP_ARM: false
if: "${{ fromJSON(needs.version.outputs.pr_created) }}"
name: "build artifacts"
run: |
Expand Down Expand Up @@ -768,19 +769,36 @@ jobs:
name: "get release version"
run: |
npm install
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ -z "${{ env.RELEASE_AS }}" ]]; then
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
else
npm exec -- release-please release-pr \
--consider-all-branches \
--dry-run \
--dry-run-output release.json \
--group-pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--manifest-file .release-please-manifest.json \
--pull-request-title-pattern "chore\${scope}: release\${component} \${version}" \
--release-type simple \
--repo-url "${{ env.RELEASE_REPO }}" \
--separate-pull-requests false \
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token "${{ steps.github_app_token.outputs.token }}" \
--release-as "${{ env.RELEASE_AS }}"
fi
cat release.json
Expand All @@ -799,7 +817,7 @@ jobs:
echo "pr_created=true" >> $GITHUB_OUTPUT
fi
working-directory: "lib"
name: "Prepare Major Release PR from main"
name: "Prepare Loki 3.0 release"
"on":
push:
branches:
Expand Down
Loading

0 comments on commit 929cd0f

Please sign in to comment.