pj

command module
v0.0.0-...-d5e2638 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 1 Imported by: 0

README

pj

pj is a command line tool for managing ProwJobs (PJs).

Installing

Install using gobin:

gobin github.com/clarketm/pj

Usage

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.
Commands
create

Create ProwJob yaml configuration.

-g, --global <file1,file2,...>

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
-i, --input <file1,file2,...>

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]
-o, --ouput <directory>

Output directory to write jobs to. Subdirectory structure is determined by the output_tmpl field.

Documentation

Overview

Copyright © 2020 Travis Clarke <travis.m.clarke@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis
pkg
cli
os

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL