Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 34 additions & 11 deletions .github/workflows/build-1.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,21 @@

name: Build (1.2-lts)

# Scheduled builds are switched off for branch-1.2-lts. Every polled run rebuilt the
# whole third party tree and went red, 48 times a day, and the branch no longer
# receives thirdparty/ changes often enough to justify polling for them. Trigger
# it by hand from the Actions tab when a build is actually needed.
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:
inputs:
force_build:
description: "Force run build job when manually triggered"
required: false
default: "true"

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
prerelease:
Expand All @@ -32,9 +44,10 @@ jobs:
contents: write
outputs:
should_release: ${{ steps.check_diff.outputs.should_release }}
doris_version: ${{ steps.check_diff.outputs.doris_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: 'apache/doris'
ref: 'branch-1.2-lts'
Expand Down Expand Up @@ -81,6 +94,7 @@ jobs:
gh release edit -F release_note.md "${tag_name}"

echo "should_release=${should_release}" >> $GITHUB_OUTPUT
echo "doris_version=${current_version}" >> $GITHUB_OUTPUT

- name: Download Source and Upload
if: steps.check_diff.outputs.should_release == 'true'
Expand All @@ -97,7 +111,7 @@ jobs:
build:
name: Build
needs: prerelease
if: needs.prerelease.outputs.should_release == 'true'
if: needs.prerelease.outputs.should_release == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.force_build == 'true')
strategy:
matrix:
config:
Expand Down Expand Up @@ -181,7 +195,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: 'apache/doris'
ref: 'branch-1.2-lts'
Expand Down Expand Up @@ -249,11 +263,12 @@ jobs:
success:
name: Success
needs: [prerelease, build]
if: needs.prerelease.outputs.should_release == 'true'
if: needs.prerelease.outputs.should_release == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.force_build == 'true')
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DORIS_VERSION: ${{ needs.prerelease.outputs.doris_version }}
permissions:
contents: write
steps:
Expand All @@ -263,18 +278,24 @@ jobs:

gh release download "${tag_name}"

content="$(gh release view "${tag_name}" | sed -n '/Update Time:/,/Doris Version:/p')"
echo -ne "${content}\nStatus: *SUCCESS*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
# Write the version this run actually built rather than parsing it back
# out of the note, so the terminal state never depends on the note
# having survived intact.
echo -ne "Update Time: *$(date)*\nDoris Version: *${DORIS_VERSION}*\nStatus: *SUCCESS*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
gh release edit -F release_note.md "${tag_name}"

failure:
name: Failure
needs: [build]
if: failure()
needs: [prerelease, build]
# Only report on a build that actually ran. If prerelease itself failed there
# is no version to record, and writing an empty one is exactly what used to
# make the next run rebuild from scratch.
if: always() && failure() && needs.prerelease.result == 'success'
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DORIS_VERSION: ${{ needs.prerelease.outputs.doris_version }}
permissions:
contents: write
steps:
Expand All @@ -284,5 +305,7 @@ jobs:

gh release download "${tag_name}"

echo -ne "Status: *FAILURE*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
# Keep Doris Version: the prerelease job keys off it, and dropping it
# made every following run look like a first release.
echo -ne "Update Time: *$(date)*\nDoris Version: *${DORIS_VERSION}*\nStatus: *FAILURE*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
gh release edit -F release_note.md "${tag_name}"
45 changes: 34 additions & 11 deletions .github/workflows/build-2.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,21 @@

name: Build (2.0)

# Scheduled builds are switched off for branch-2.0. Every polled run rebuilt the
# whole third party tree and went red, 48 times a day, and the branch no longer
# receives thirdparty/ changes often enough to justify polling for them. Trigger
# it by hand from the Actions tab when a build is actually needed.
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:
inputs:
force_build:
description: "Force run build job when manually triggered"
required: false
default: "true"

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
prerelease:
Expand All @@ -32,9 +44,10 @@ jobs:
contents: write
outputs:
should_release: ${{ steps.check_diff.outputs.should_release }}
doris_version: ${{ steps.check_diff.outputs.doris_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: 'apache/doris'
ref: 'branch-2.0'
Expand Down Expand Up @@ -81,6 +94,7 @@ jobs:
gh release edit -F release_note.md "${tag_name}"

echo "should_release=${should_release}" >> $GITHUB_OUTPUT
echo "doris_version=${current_version}" >> $GITHUB_OUTPUT

- name: Download Source and Upload
if: steps.check_diff.outputs.should_release == 'true'
Expand All @@ -97,7 +111,7 @@ jobs:
build:
name: Build
needs: prerelease
if: needs.prerelease.outputs.should_release == 'true'
if: needs.prerelease.outputs.should_release == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.force_build == 'true')
strategy:
matrix:
config:
Expand Down Expand Up @@ -198,7 +212,7 @@ jobs:
remove-docker-images: 'true'

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: 'apache/doris'
ref: 'branch-2.0'
Expand Down Expand Up @@ -266,11 +280,12 @@ jobs:
success:
name: Success
needs: [prerelease, build]
if: needs.prerelease.outputs.should_release == 'true'
if: needs.prerelease.outputs.should_release == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.force_build == 'true')
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DORIS_VERSION: ${{ needs.prerelease.outputs.doris_version }}
permissions:
contents: write
steps:
Expand All @@ -280,18 +295,24 @@ jobs:

gh release download "${tag_name}"

content="$(gh release view "${tag_name}" | sed -n '/Update Time:/,/Doris Version:/p')"
echo -ne "${content}\nStatus: *SUCCESS*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
# Write the version this run actually built rather than parsing it back
# out of the note, so the terminal state never depends on the note
# having survived intact.
echo -ne "Update Time: *$(date)*\nDoris Version: *${DORIS_VERSION}*\nStatus: *SUCCESS*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
gh release edit -F release_note.md "${tag_name}"

failure:
name: Failure
needs: [build]
if: failure()
needs: [prerelease, build]
# Only report on a build that actually ran. If prerelease itself failed there
# is no version to record, and writing an empty one is exactly what used to
# make the next run rebuild from scratch.
if: always() && failure() && needs.prerelease.result == 'success'
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DORIS_VERSION: ${{ needs.prerelease.outputs.doris_version }}
permissions:
contents: write
steps:
Expand All @@ -301,5 +322,7 @@ jobs:

gh release download "${tag_name}"

echo -ne "Status: *FAILURE*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
# Keep Doris Version: the prerelease job keys off it, and dropping it
# made every following run look like a first release.
echo -ne "Update Time: *$(date)*\nDoris Version: *${DORIS_VERSION}*\nStatus: *FAILURE*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
gh release edit -F release_note.md "${tag_name}"
45 changes: 34 additions & 11 deletions .github/workflows/build-2.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,21 @@

name: Build (2.1)

# Scheduled builds are switched off for branch-2.1. Every polled run rebuilt the
# whole third party tree and went red, 48 times a day, and the branch no longer
# receives thirdparty/ changes often enough to justify polling for them. Trigger
# it by hand from the Actions tab when a build is actually needed.
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:
inputs:
force_build:
description: "Force run build job when manually triggered"
required: false
default: "true"

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
prerelease:
Expand All @@ -32,9 +44,10 @@ jobs:
contents: write
outputs:
should_release: ${{ steps.check_diff.outputs.should_release }}
doris_version: ${{ steps.check_diff.outputs.doris_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: 'apache/doris'
ref: 'branch-2.1'
Expand Down Expand Up @@ -81,6 +94,7 @@ jobs:
gh release edit -F release_note.md "${tag_name}"

echo "should_release=${should_release}" >> $GITHUB_OUTPUT
echo "doris_version=${current_version}" >> $GITHUB_OUTPUT

- name: Download Source and Upload
if: steps.check_diff.outputs.should_release == 'true'
Expand All @@ -97,7 +111,7 @@ jobs:
build:
name: Build
needs: prerelease
if: needs.prerelease.outputs.should_release == 'true'
if: needs.prerelease.outputs.should_release == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.force_build == 'true')
strategy:
matrix:
config:
Expand Down Expand Up @@ -198,7 +212,7 @@ jobs:
remove-docker-images: 'true'

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: 'apache/doris'
ref: 'branch-2.1'
Expand Down Expand Up @@ -266,11 +280,12 @@ jobs:
success:
name: Success
needs: [prerelease, build]
if: needs.prerelease.outputs.should_release == 'true'
if: needs.prerelease.outputs.should_release == 'true' || (github.event_name == 'workflow_dispatch' && github.event.inputs.force_build == 'true')
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DORIS_VERSION: ${{ needs.prerelease.outputs.doris_version }}
permissions:
contents: write
steps:
Expand All @@ -280,18 +295,24 @@ jobs:

gh release download "${tag_name}"

content="$(gh release view "${tag_name}" | sed -n '/Update Time:/,/Doris Version:/p')"
echo -ne "${content}\nStatus: *SUCCESS*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
# Write the version this run actually built rather than parsing it back
# out of the note, so the terminal state never depends on the note
# having survived intact.
echo -ne "Update Time: *$(date)*\nDoris Version: *${DORIS_VERSION}*\nStatus: *SUCCESS*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
gh release edit -F release_note.md "${tag_name}"

failure:
name: Failure
needs: [build]
if: failure()
needs: [prerelease, build]
# Only report on a build that actually ran. If prerelease itself failed there
# is no version to record, and writing an empty one is exactly what used to
# make the next run rebuild from scratch.
if: always() && failure() && needs.prerelease.result == 'success'
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DORIS_VERSION: ${{ needs.prerelease.outputs.doris_version }}
permissions:
contents: write
steps:
Expand All @@ -301,5 +322,7 @@ jobs:

gh release download "${tag_name}"

echo -ne "Status: *FAILURE*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
# Keep Doris Version: the prerelease job keys off it, and dropping it
# made every following run look like a first release.
echo -ne "Update Time: *$(date)*\nDoris Version: *${DORIS_VERSION}*\nStatus: *FAILURE*\n\n## SHA256 Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
gh release edit -F release_note.md "${tag_name}"
Loading