Skip to content

Commit

Permalink
Merge pull request #43042 from ClickHouse/backport/22.10/43017
Browse files Browse the repository at this point in the history
Backport #43017 to 22.10: Add a CI step to mark commits as ready for release
  • Loading branch information
Felixoid committed Nov 9, 2022
2 parents 9c52742 + 43525c2 commit 5786969
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,23 @@ jobs:
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
sudo rm -fr "$TEMP_PATH"
MarkReleaseReady:
needs:
- BuilderBinDarwin
- BuilderBinDarwinAarch64
- BuilderDebRelease
- BuilderDebAarch64
runs-on: [self-hosted, style-checker]
steps:
- name: Clear repository
run: |
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
- name: Check out repository code
uses: actions/checkout@v2
- name: Mark Commit Release Ready
run: |
cd "$GITHUB_WORKSPACE/tests/ci"
python3 mark_release_ready.py
##############################################################################################
########################### FUNCTIONAl STATELESS TESTS #######################################
##############################################################################################
Expand Down Expand Up @@ -2998,6 +3015,8 @@ jobs:
needs:
- DockerHubPush
- BuilderReport
- BuilderSpecialReport
- MarkReleaseReady
- FunctionalStatelessTestDebug0
- FunctionalStatelessTestDebug1
- FunctionalStatelessTestDebug2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3508,6 +3508,7 @@ jobs:
- DockerServerImages
- CheckLabels
- BuilderReport
- BuilderSpecialReport
- FastTest
- FunctionalStatelessTestDebug0
- FunctionalStatelessTestDebug1
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/release_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,23 @@ jobs:
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
sudo rm -fr "$TEMP_PATH"
MarkReleaseReady:
needs:
- BuilderBinDarwin
- BuilderBinDarwinAarch64
- BuilderDebRelease
- BuilderDebAarch64
runs-on: [self-hosted, style-checker]
steps:
- name: Clear repository
run: |
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
- name: Check out repository code
uses: actions/checkout@v2
- name: Mark Commit Release Ready
run: |
cd "$GITHUB_WORKSPACE/tests/ci"
python3 mark_release_ready.py
##############################################################################################
########################### FUNCTIONAl STATELESS TESTS #######################################
##############################################################################################
Expand Down Expand Up @@ -1888,6 +1905,7 @@ jobs:
- DockerServerImages
- BuilderReport
- BuilderSpecialReport
- MarkReleaseReady
- FunctionalStatelessTestDebug0
- FunctionalStatelessTestDebug1
- FunctionalStatelessTestDebug2
Expand Down
25 changes: 25 additions & 0 deletions tests/ci/mark_release_ready.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python3

from commit_status_helper import get_commit
from env_helper import GITHUB_JOB_URL
from get_robot_token import get_best_robot_token
from github_helper import GitHub
from pr_info import PRInfo

RELEASE_READY_STATUS = "Ready for release"


def main():
pr_info = PRInfo()
gh = GitHub(get_best_robot_token(), per_page=100)
commit = get_commit(gh, pr_info.sha)
commit.create_status(
context=RELEASE_READY_STATUS,
description="the release can be created from the commit",
state="success",
target_url=GITHUB_JOB_URL(),
)


if __name__ == "__main__":
main()

0 comments on commit 5786969

Please sign in to comment.