Run prowjobs on your local workstation with
Plato believed that ideas and forms are the ultimate truth, whereas we only see the imperfect physical appearances of those idea.
He linkens this in his Allegory of the Cave to someone living in a cave who can only see the shadows projected on the wall from objects passing in front of a fire.
Phaino is act of making those imperfect shadows appear.
Phaino shares a prefix with Pharos, meaning lighthouse and in particular the ancient one in Alexandria.
# Use a job from deck go run ./prow/cmd/phaino $URL # or /path/to/prowjob.yaml # Use mkpj to create the job go run ./prow/cmd/mkpj --config-path=/path/to/prow/config.yaml --job-config-path=/path/to/prow/job/configs --job=foo > /tmp/foo go run ./prow/cmd/phaino /tmp/foo
Phaino is an interactive utility; it will prompt you for a local copy of any secrets or volumes that the Prow Job may require.
--grace=5mcontrols how long to wait for interrupted jobs before terminating
--privilegedjobs are allowed to run instead of rejected
--timeout=10mcontrols how long to allow jobs to run before interrupting them
--code-mount-path=/gochanges the path where code is mounted in the container
--skip-volume-mounts=volume1,volume2includes the unwanted volume mounts that are defined in the job spec
--extra-volume-mounts=/go/src/k8s.io/test-infra=/Users/xyz/k8s-test-infraincludes the extra volume mounts needed for the container. Key is the mount path and value is the local path
--skip-envs=env1,env2includes the unwanted env vars that are defined in the job spec
--extra-envs=env1=val1,env2=val2includes the extra env vars needed for the container
--use-local-gcloud-credentialscontrols whether to use the same gcloud credentials as local or not
--use-local-kubeconfigcontrols whether to use the same kubeconfig as local or not
Common options usage scenarios
Phaino is smart at prompting for where repo is located, volume mounts etc., if it’s desired to save the prompts, use the following tricks instead:
If the repo needs to be cloned under GOPATH, use:
--code-mount-path==/whatever/go/src # Controls where source code is mounted in container --extra-volume-mounts=/whatever/go/src/k8s.io/test-infra=/Users/xyz/k8s-test-infra
If job requires mounting kubeconfig, assume the mount is named
If job requires mounting gcloud default credentials, assume the mount is named
If job requires mounting something else like
name:foo; mountPath: /bar,use:
If job requires env vars,use:
go run ./prow/cmd/phaino --help for full option list.
- Go to your deck deployment
- Pick a job and click the rerun icon on the left
- Copy the URL (something like
- Paste it as a phaino arg
go run ./prow/cmd/phaino https://prow.k8s.io/rerun?prowjob=d08f1ca5-5d63-11e9-ab62-0a580a6c1281
go run ./prow/cmd/phaino <(curl $URL)
mkpjto create the job and pipe this to
For prow.k8s.io jobs use
go run ./config:mkpj --job=pull-test-infra-bazel > /tmp/foo go run ./prow/cmd/phaino /tmp/foo
Other deployments will need to clone that rule and/or pass in extra flags:
go run ./prow/cmd/mkpj --config-path=/my/config.yaml --job=my-job go run ./prow/cmd/phaino /tmp/foo
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.