pullup

module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0

README

pullup

GitHub release CircleCI codecov

Deploy pull requests on a Kubernetes cluster before merged.

Installation

Install CRDs.

kubectl create -f https://github.com/tommy351/pullup/blob/master/deployment/crds/webhook.yml
kubectl create -f https://github.com/tommy351/pullup/blob/master/deployment/crds/resource-set.yml

Create a new service account and RBAC. By default, it only grants access to deployments, services and pullup resources. You may need to modify RBAC if you want to deploy more kinds of resources.

kubectl create -f https://github.com/tommy351/pullup/blob/master/deployment/rbac.yml

Create a new deployment. It runs a controller that monitoring resource changes and starts a HTTP server listening on port 4000.

kubectl create -f https://github.com/tommy351/pullup/blob/master/deployment/deployment.yml

Create a new service.

kubectl create -f https://github.com/tommy351/pullup/blob/master/deployment/service.yml

Definitions

Webhook
apiVersion: pullup.dev/v1alpha1
kind: Webhook
metadata:
  name: example
spec:
  github:
    secret: ''
  # Resources to apply when receiving GitHub webhooks
  resources:
    - apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: example
      spec:
        template:
          spec:
            - name: foo
              image: tommy351/foo:{{ .Spec.Head.SHA }}
    - apiVersion: v1
      kind: Service
      metadata:
        name: example

Configuration

Flag Description Environment Variable Default
log.level Log level. Possible values: debug, info, warn, error, panic, fatal LOG_LEVEL info
namespace Kubernetes namespace KUBERNETES_NAMESPACE default
kubeconfig Kubernetes config path. Don't set this unless it's run out of cluster. KUBECONFIG
webhook-address Webhook listening address WEBHOOK_ADDRESS :4000

Development

Run tests.

./hack/run-test.sh

Run integration tests.

./hack/download-test-assets.sh
./hack/run-test.sh -tags integration

Generate code.

./hack/update-codegen.sh

License

MIT

Directories

Path Synopsis
cmd
internal
k8s
log
pkg
apis/pullup/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/pullup/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/pullup/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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