diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 05fd337e57c5..2b1734c87d53 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,7 +11,7 @@ on: # yamllint disable-line rule:truthy - reopened - opened branches: - - master + - oss_runners paths-ignore: - 'docker/docs/**' - 'docs/**' diff --git a/docker/test/fasttest/Dockerfile b/docker/test/fasttest/Dockerfile index aa209f197dfd..bc79bea416c9 100644 --- a/docker/test/fasttest/Dockerfile +++ b/docker/test/fasttest/Dockerfile @@ -1,7 +1,11 @@ # rebuild in #33610 # docker build -t clickhouse/fasttest . ARG FROM_TAG=latest -FROM clickhouse/test-util:$FROM_TAG +ARG DOCKER_REPO=docker.io +FROM $DOCKER_REPO/clickhouse/test-util:$FROM_TAG + +ENV GITHUB_SERVER_URL=https://github.com +ENV GITHUB_REPOSITORY=ClickHouse/ClickHouse # ARG for quick switch to a given ubuntu mirror ARG apt_archive="http://archive.ubuntu.com" diff --git a/docker/test/fasttest/run.sh b/docker/test/fasttest/run.sh index 2bbdd978e5e7..e4b08e98523d 100755 --- a/docker/test/fasttest/run.sh +++ b/docker/test/fasttest/run.sh @@ -73,7 +73,7 @@ function start_server function clone_root { git config --global --add safe.directory "$FASTTEST_SOURCE" - git clone --depth 1 https://github.com/ClickHouse/ClickHouse.git -- "$FASTTEST_SOURCE" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee "$FASTTEST_OUTPUT/clone_log.txt" + git clone --depth 1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY -- "$FASTTEST_SOURCE" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee "$FASTTEST_OUTPUT/clone_log.txt" ( cd "$FASTTEST_SOURCE" diff --git a/tests/ci/fast_test_check.py b/tests/ci/fast_test_check.py index b756a5c709f8..eab7933bd416 100644 --- a/tests/ci/fast_test_check.py +++ b/tests/ci/fast_test_check.py @@ -8,10 +8,10 @@ from github import Github -from env_helper import CACHES_PATH, TEMP_PATH, GITHUB_SERVER_URL, GITHUB_REPOSITORY +from env_helper import CACHES_PATH, TEMP_PATH, GITHUB_SERVER_URL, GITHUB_REPOSITORY, DOCKER_REPO, DOCKER_USER from pr_info import FORCE_TESTS_LABEL, PRInfo, SKIP_SIMPLE_CHECK_LABEL from s3_helper import S3Helper -from get_robot_token import get_best_robot_token +from get_robot_token import get_best_robot_token, get_parameter_from_ssm from upload_result_helper import upload_results from docker_pull_helper import get_image_with_version from commit_status_helper import post_commit_status, get_commit @@ -37,6 +37,8 @@ def get_fasttest_cmd( f"-e FASTTEST_SOURCE=/ClickHouse --cap-add=SYS_PTRACE " f"-e PULL_REQUEST_NUMBER={pr_number} -e COMMIT_SHA={commit_sha} " f"-e COPY_CLICKHOUSE_BINARY_TO_OUTPUT=1 " + f"-e GITHUB_SERVER_URL={GITHUB_SERVER_URL} " + f"-e GITHUB_REPOSITORY={GITHUB_REPOSITORY} " f"--volume={workspace}:/fasttest-workspace --volume={repo_path}:/ClickHouse " f"--volume={output_path}:/test_output " f"--volume={ccache_path}:/fasttest-workspace/ccache {image}" @@ -90,6 +92,13 @@ def process_results(result_folder): pr_info = PRInfo() + subprocess.check_output( # pylint: disable=unexpected-keyword-arg + "docker login {} --username '{}' --password-stdin".format(DOCKER_REPO, DOCKER_USER), + input=get_parameter_from_ssm("dockerhub_robot_password"), + encoding="utf-8", + shell=True, + ) + gh = Github(get_best_robot_token()) rerun_helper = RerunHelper(gh, pr_info, NAME) @@ -97,7 +106,7 @@ def process_results(result_folder): logging.info("Check is already finished according to github status, exiting") sys.exit(0) - docker_image = get_image_with_version(temp_path, "clickhouse/fasttest") + docker_image = get_image_with_version(temp_path, "{}/clickhouse/fasttest".format(DOCKER_REPO)) s3_helper = S3Helper()