https://github.com/clarketm/pj
Command line tool for working with ProwJobs (PJ)
https://github.com/clarketm/pj
cli kubernetes prow prowjob
Last synced: about 1 month ago
JSON representation
Command line tool for working with ProwJobs (PJ)
- Host: GitHub
- URL: https://github.com/clarketm/pj
- Owner: clarketm
- License: mit
- Created: 2020-03-08T02:53:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-07T12:39:24.000Z (over 5 years ago)
- Last Synced: 2025-06-09T13:06:25.547Z (about 1 year ago)
- Topics: cli, kubernetes, prow, prowjob
- Language: Go
- Homepage:
- Size: 76.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pj
pj is a command line tool for managing ProwJobs (PJs).
## Installing
Install using [gobin](https://github.com/myitcv/gobin):
```shell
gobin github.com/clarketm/pj
```
## Usage
```shell
pj --help
```
```console
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.
```
### Commands
#### `create`
Create ProwJob yaml configuration.
##### `-g, --global `
Global configuration files containing *default* values inherited by all jobs.
```yaml
# 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
```
##### `-i, --input `
Job configuration files with *optional* file-level *defaults*.
```yaml
# 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]
```
##### `-o, --ouput `
Output directory to write jobs to. Subdirectory structure is determined by the `output_tmpl` field.