pj is a command line tool for managing ProwJobs (PJs).
Install using gobin:
gobin github.com/clarketm/pj
pj --help
ProwJob job manager
Usage:
pj [flags]
pj [command]
Available Commands:
create Create ProwJob yaml configuration
help Help about any command
Flags:
--config string Config file (default is $HOME/.pj.yaml).
-h, --help help for pj
-v, --verbose Enable verbose output.
--version Version number.
Use "pj [command] --help" for more information about a command.
Create ProwJob yaml configuration.
Global configuration files containing default values inherited by all jobs.
# All valid `metav1.ObjectMeta`, `corev1.Container`, and `corev1.PodSpec` fields are accepted.
labels: {app.kubernetes.io/part-of: prow}
namespace: test-pods
resources: {requests: {cpu: 1}, limits: {cpu: 3}}
aliases: {istio: istio.io}
clusterName: default
# Requirements are a `map[string]Job` that a job can `require` as part of its definition.
requirements:
gcp:
labels:
preset-service-account: "true"
root:
securityContext:
privileged: true
Job configuration files with optional file-level defaults.
# Local defaults inherited by all the below jobs.
repo: istio/istio
nodeSelector: {testing: test-pool}
clone_tmpl: "https://github.com/{{.Org}}/{{.Repo}}.git"
output_tmpl: "{{.Org}}/{{.Repo}}/{{.Org}}.{{.Repo}}.gen"
jobs:
- name: job_1
types: [presubmit]
require: [gcp] # a corresponding `requirements` item must exist.
labels: {app.kubernetes.io/version: 1.0.0}
branches: [master]
image: alpine:latest
command: [echo, test1]
extra_repos: [istio/test-infra@master]
Output directory to write jobs to. Subdirectory structure is determined by the output_tmpl
field.