mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge pull request #60602 from ClickHouse/ci_remove_docker_server_job_input_params
CI: remove inputs from docker_server job command
This commit is contained in:
commit
2c713c2b90
6
.github/workflows/backport_branches.yml
vendored
6
.github/workflows/backport_branches.yml
vendored
@ -142,9 +142,6 @@ jobs:
|
||||
test_name: Docker server image
|
||||
runner_type: style-checker
|
||||
data: ${{ needs.RunConfig.outputs.data }}
|
||||
run_command: |
|
||||
python3 docker_server.py --release-type head --no-push \
|
||||
--image-repo clickhouse/clickhouse-server --image-path docker/server --allow-build-reuse
|
||||
DockerKeeperImage:
|
||||
needs: [RunConfig, BuilderDebRelease, BuilderDebAarch64]
|
||||
if: ${{ !failure() && !cancelled() }}
|
||||
@ -153,9 +150,6 @@ jobs:
|
||||
test_name: Docker keeper image
|
||||
runner_type: style-checker
|
||||
data: ${{ needs.RunConfig.outputs.data }}
|
||||
run_command: |
|
||||
python3 docker_server.py --release-type head --no-push \
|
||||
--image-repo clickhouse/clickhouse-keeper --image-path docker/keeper --allow-build-reuse
|
||||
############################################################################################
|
||||
##################################### BUILD REPORTER #######################################
|
||||
############################################################################################
|
||||
|
6
.github/workflows/master.yml
vendored
6
.github/workflows/master.yml
vendored
@ -253,9 +253,6 @@ jobs:
|
||||
test_name: Docker server image
|
||||
runner_type: style-checker
|
||||
data: ${{ needs.RunConfig.outputs.data }}
|
||||
run_command: |
|
||||
python3 docker_server.py --release-type head \
|
||||
--image-repo clickhouse/clickhouse-server --image-path docker/server --allow-build-reuse
|
||||
DockerKeeperImage:
|
||||
needs: [RunConfig, BuilderDebRelease, BuilderDebAarch64]
|
||||
if: ${{ !failure() && !cancelled() }}
|
||||
@ -264,9 +261,6 @@ jobs:
|
||||
test_name: Docker keeper image
|
||||
runner_type: style-checker
|
||||
data: ${{ needs.RunConfig.outputs.data }}
|
||||
run_command: |
|
||||
python3 docker_server.py --release-type head \
|
||||
--image-repo clickhouse/clickhouse-keeper --image-path docker/keeper --allow-build-reuse
|
||||
############################################################################################
|
||||
##################################### BUILD REPORTER #######################################
|
||||
############################################################################################
|
||||
|
6
.github/workflows/pull_request.yml
vendored
6
.github/workflows/pull_request.yml
vendored
@ -285,9 +285,6 @@ jobs:
|
||||
test_name: Docker server image
|
||||
runner_type: style-checker
|
||||
data: ${{ needs.RunConfig.outputs.data }}
|
||||
run_command: |
|
||||
python3 docker_server.py --release-type head --no-push \
|
||||
--image-repo clickhouse/clickhouse-server --image-path docker/server --allow-build-reuse
|
||||
DockerKeeperImage:
|
||||
needs: [RunConfig, BuilderDebRelease, BuilderDebAarch64]
|
||||
if: ${{ !failure() && !cancelled() }}
|
||||
@ -296,9 +293,6 @@ jobs:
|
||||
test_name: Docker keeper image
|
||||
runner_type: style-checker
|
||||
data: ${{ needs.RunConfig.outputs.data }}
|
||||
run_command: |
|
||||
python3 docker_server.py --release-type head --no-push \
|
||||
--image-repo clickhouse/clickhouse-keeper --image-path docker/keeper --allow-build-reuse
|
||||
############################################################################################
|
||||
##################################### BUILD REPORTER #######################################
|
||||
############################################################################################
|
||||
|
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@ -54,10 +54,13 @@ jobs:
|
||||
- name: Check docker clickhouse/clickhouse-server building
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE/tests/ci"
|
||||
python3 docker_server.py --release-type auto --version "$GITHUB_TAG" \
|
||||
--image-repo clickhouse/clickhouse-server --image-path docker/server
|
||||
python3 docker_server.py --release-type auto --version "$GITHUB_TAG" \
|
||||
--image-repo clickhouse/clickhouse-keeper --image-path docker/keeper
|
||||
export CHECK_NAME="Docker server image"
|
||||
python3 docker_server.py --release-type auto --version "$GITHUB_TAG" --check-name "$CHECK_NAME" --push
|
||||
- name: Check docker clickhouse/clickhouse-keeper building
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE/tests/ci"
|
||||
export CHECK_NAME="Docker keeper image"
|
||||
python3 docker_server.py --release-type auto --version "$GITHUB_TAG" --check-name "$CHECK_NAME" --push
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
|
6
.github/workflows/release_branches.yml
vendored
6
.github/workflows/release_branches.yml
vendored
@ -165,9 +165,6 @@ jobs:
|
||||
test_name: Docker server image
|
||||
runner_type: style-checker
|
||||
data: ${{ needs.RunConfig.outputs.data }}
|
||||
run_command: |
|
||||
python3 docker_server.py --release-type head --no-push \
|
||||
--image-repo clickhouse/clickhouse-server --image-path docker/server --allow-build-reuse
|
||||
DockerKeeperImage:
|
||||
needs: [RunConfig, BuilderDebRelease, BuilderDebAarch64]
|
||||
if: ${{ !failure() && !cancelled() }}
|
||||
@ -176,9 +173,6 @@ jobs:
|
||||
test_name: Docker keeper image
|
||||
runner_type: style-checker
|
||||
data: ${{ needs.RunConfig.outputs.data }}
|
||||
run_command: |
|
||||
python3 docker_server.py --release-type head --no-push \
|
||||
--image-repo clickhouse/clickhouse-keeper --image-path docker/keeper --allow-build-reuse
|
||||
############################################################################################
|
||||
##################################### BUILD REPORTER #######################################
|
||||
############################################################################################
|
||||
|
@ -399,6 +399,16 @@ bugfix_validate_check = DigestConfig(
|
||||
],
|
||||
)
|
||||
# common test params
|
||||
docker_server_job_config = JobConfig(
|
||||
required_on_release_branch=True,
|
||||
run_command='docker_server.py --check-name "$CHECK_NAME" --release-type head --allow-build-reuse',
|
||||
digest=DigestConfig(
|
||||
include_paths=[
|
||||
"tests/ci/docker_server.py",
|
||||
"./docker/server",
|
||||
]
|
||||
),
|
||||
)
|
||||
compatibility_test_common_params = {
|
||||
"digest": compatibility_check_digest,
|
||||
"run_command": "compatibility_check.py",
|
||||
@ -849,29 +859,8 @@ CI_CONFIG = CIConfig(
|
||||
),
|
||||
},
|
||||
other_jobs_configs={
|
||||
JobNames.DOCKER_SERVER: TestConfig(
|
||||
"",
|
||||
job_config=JobConfig(
|
||||
required_on_release_branch=True,
|
||||
digest=DigestConfig(
|
||||
include_paths=[
|
||||
"tests/ci/docker_server.py",
|
||||
"./docker/server",
|
||||
]
|
||||
),
|
||||
),
|
||||
),
|
||||
JobNames.DOCKER_KEEPER: TestConfig(
|
||||
"",
|
||||
job_config=JobConfig(
|
||||
digest=DigestConfig(
|
||||
include_paths=[
|
||||
"tests/ci/docker_server.py",
|
||||
"./docker/keeper",
|
||||
]
|
||||
),
|
||||
),
|
||||
),
|
||||
JobNames.DOCKER_SERVER: TestConfig("", job_config=docker_server_job_config),
|
||||
JobNames.DOCKER_KEEPER: TestConfig("", job_config=docker_server_job_config),
|
||||
JobNames.DOCS_CHECK: TestConfig(
|
||||
"",
|
||||
job_config=JobConfig(
|
||||
|
@ -51,7 +51,11 @@ def parse_args() -> argparse.Namespace:
|
||||
description="A program to build clickhouse-server image, both alpine and "
|
||||
"ubuntu versions",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--check-name",
|
||||
required=False,
|
||||
default="",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--version",
|
||||
type=version_arg,
|
||||
@ -71,13 +75,13 @@ def parse_args() -> argparse.Namespace:
|
||||
parser.add_argument(
|
||||
"--image-path",
|
||||
type=str,
|
||||
default="docker/server",
|
||||
default="",
|
||||
help="a path to docker context directory",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--image-repo",
|
||||
type=str,
|
||||
default="clickhouse/clickhouse-server",
|
||||
default="",
|
||||
help="image name on docker hub",
|
||||
)
|
||||
parser.add_argument(
|
||||
@ -92,14 +96,7 @@ def parse_args() -> argparse.Namespace:
|
||||
default=argparse.SUPPRESS,
|
||||
help="don't push reports to S3 and github",
|
||||
)
|
||||
parser.add_argument("--push", default=True, help=argparse.SUPPRESS)
|
||||
parser.add_argument(
|
||||
"--no-push-images",
|
||||
action="store_false",
|
||||
dest="push",
|
||||
default=argparse.SUPPRESS,
|
||||
help="don't push images to docker hub",
|
||||
)
|
||||
parser.add_argument("--push", action="store_true", help=argparse.SUPPRESS)
|
||||
parser.add_argument("--os", default=["ubuntu", "alpine"], help=argparse.SUPPRESS)
|
||||
parser.add_argument(
|
||||
"--no-ubuntu",
|
||||
@ -337,13 +334,37 @@ def main():
|
||||
makedirs(TEMP_PATH, exist_ok=True)
|
||||
|
||||
args = parse_args()
|
||||
image = DockerImageData(args.image_path, args.image_repo, False)
|
||||
|
||||
pr_info = PRInfo()
|
||||
|
||||
if args.check_name:
|
||||
assert not args.image_path and not args.image_repo
|
||||
if "server image" in args.check_name:
|
||||
image_path = "docker/server"
|
||||
image_repo = "clickhouse/clickhouse-server"
|
||||
elif "keeper image" in args.check_name:
|
||||
image_path = "docker/keeper"
|
||||
image_repo = "clickhouse/clickhouse-keeper"
|
||||
else:
|
||||
assert False, "Invalid --check-name"
|
||||
else:
|
||||
assert args.image_path and args.image_repo
|
||||
image_path = args.image_path
|
||||
image_repo = args.image_repo
|
||||
|
||||
push = args.push
|
||||
del args.image_path
|
||||
del args.image_repo
|
||||
del args.push
|
||||
|
||||
if pr_info.is_master():
|
||||
push = True
|
||||
|
||||
image = DockerImageData(image_path, image_repo, False)
|
||||
args.release_type = auto_release_type(args.version, args.release_type)
|
||||
tags = gen_tags(args.version, args.release_type)
|
||||
pr_info = None
|
||||
repo_urls = dict()
|
||||
direct_urls: Dict[str, List[str]] = dict()
|
||||
pr_info = PRInfo()
|
||||
release_or_pr, _ = get_release_or_pr(pr_info, args.version)
|
||||
|
||||
for arch, build_name in zip(ARCH, ("package_release", "package_aarch64")):
|
||||
@ -355,13 +376,13 @@ def main():
|
||||
repo_urls[arch] = f"{args.bucket_prefix}/{build_name}"
|
||||
if args.allow_build_reuse:
|
||||
# read s3 urls from pre-downloaded build reports
|
||||
if "clickhouse-server" in args.image_repo:
|
||||
if "clickhouse-server" in image_repo:
|
||||
PACKAGES = [
|
||||
"clickhouse-client",
|
||||
"clickhouse-server",
|
||||
"clickhouse-common-static",
|
||||
]
|
||||
elif "clickhouse-keeper" in args.image_repo:
|
||||
elif "clickhouse-keeper" in image_repo:
|
||||
PACKAGES = ["clickhouse-keeper"]
|
||||
else:
|
||||
assert False, "BUG"
|
||||
@ -375,7 +396,7 @@ def main():
|
||||
if any(package in url for package in PACKAGES) and "-dbg" not in url
|
||||
]
|
||||
|
||||
if args.push:
|
||||
if push:
|
||||
docker_login()
|
||||
|
||||
logging.info("Following tags will be created: %s", ", ".join(tags))
|
||||
@ -385,7 +406,7 @@ def main():
|
||||
for tag in tags:
|
||||
test_results.extend(
|
||||
build_and_push_image(
|
||||
image, args.push, repo_urls, os, tag, args.version, direct_urls
|
||||
image, push, repo_urls, os, tag, args.version, direct_urls
|
||||
)
|
||||
)
|
||||
if test_results[-1].status != "OK":
|
||||
|
Loading…
Reference in New Issue
Block a user