mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-04 07:49:35 +00:00 
			
		
		
		
	Adds a go app which runs the e2e tests with ginkgo. - Supports all the existing env vars of the bash script - Improved flow control to avoid and better report issues regarding the process PID - Adds flags for modifying where to find the test binary and ginkgo binary so that you can run it locally - Adds 3 flags for specifying extra args before the double-dash, extra args after the double-dash, and the seperator to use between values in those env vars. This allows setting arbitrary, complex values for use on the command such as flags which include spaces or other characters.
		
			
				
	
	
		
			73 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
load("@io_bazel_rules_docker//container:container.bzl", "container_layer")
 | 
						|
load("//build:platforms.bzl", "SERVER_PLATFORMS")
 | 
						|
load("//build:container.bzl", "multi_arch_container")
 | 
						|
 | 
						|
container_layer(
 | 
						|
    name = "cluster-srcs",
 | 
						|
    data_path = "/",
 | 
						|
    directory = "/kubernetes",
 | 
						|
    files = ["//cluster:all-srcs"],
 | 
						|
)
 | 
						|
 | 
						|
container_layer(
 | 
						|
    name = "bins",
 | 
						|
    directory = "/usr/local/bin",
 | 
						|
    files = [
 | 
						|
        "//cluster/images/conformance/go-runner",
 | 
						|
        "//cmd/kubectl",
 | 
						|
        "//test/e2e:e2e.test_binary",
 | 
						|
        "//vendor/github.com/onsi/ginkgo/ginkgo",
 | 
						|
    ],
 | 
						|
)
 | 
						|
 | 
						|
multi_arch_container(
 | 
						|
    name = "conformance",
 | 
						|
    architectures = SERVER_PLATFORMS["linux"],
 | 
						|
    base = "@debian-hyperkube-base-{ARCH}//image",
 | 
						|
    cmd = [
 | 
						|
        "/bin/bash",
 | 
						|
        "-c",
 | 
						|
        "/run_e2e.sh",
 | 
						|
    ],
 | 
						|
    # {ARCH} is replaced by the macro, but STABLE_ vars are replaced by the
 | 
						|
    # build stamping, so we need to escape them
 | 
						|
    docker_push_tags = ["{{STABLE_DOCKER_PUSH_REGISTRY}}/conformance-{ARCH}:{{STABLE_DOCKER_TAG}}"],
 | 
						|
    docker_tags = ["{{STABLE_DOCKER_REGISTRY}}/conformance-{ARCH}:{{STABLE_DOCKER_TAG}}"],
 | 
						|
    env = {
 | 
						|
        "E2E_FOCUS": "\[Conformance\]",
 | 
						|
        "E2E_SKIP": "",
 | 
						|
        "E2E_PARALLEL": "1",
 | 
						|
        "E2E_PROVIDER": "local",
 | 
						|
        "RESULTS_DIR": "/tmp/results",
 | 
						|
        "KUBECONFIG": "",
 | 
						|
    },
 | 
						|
    files = [
 | 
						|
        ":run_e2e.sh",
 | 
						|
    ],
 | 
						|
    layers = [
 | 
						|
        ":cluster-srcs",
 | 
						|
        ":bins",
 | 
						|
    ],
 | 
						|
    stamp = True,
 | 
						|
    tags = ["manual"],
 | 
						|
    visibility = ["//visibility:public"],
 | 
						|
    workdir = "/usr/local/bin",
 | 
						|
)
 | 
						|
 | 
						|
filegroup(
 | 
						|
    name = "package-srcs",
 | 
						|
    srcs = glob(["**"]),
 | 
						|
    tags = ["automanaged"],
 | 
						|
    visibility = ["//visibility:private"],
 | 
						|
)
 | 
						|
 | 
						|
filegroup(
 | 
						|
    name = "all-srcs",
 | 
						|
    srcs = [
 | 
						|
        ":package-srcs",
 | 
						|
        "//cluster/images/conformance/go-runner:all-srcs",
 | 
						|
    ],
 | 
						|
    tags = ["automanaged"],
 | 
						|
    visibility = ["//visibility:public"],
 | 
						|
)
 |