Skip to content

Commit

Permalink
Fix Makefiles and linting errors
Browse files Browse the repository at this point in the history
Fix issues in make/dev.mk

Update code base wrt to linting errors

Add /out to .gitignore

Signed-off-by: Nikhil Thomas <nikhilthomas1@gmail.com>
  • Loading branch information
nikhil-thomas committed Jun 12, 2019
1 parent 58dce0a commit 078446e
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ anaconda-mode/

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
/out
### Vim ###
# swap
.sw[a-p]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
path: version
description: |
# OpenShift Pipelines
OpenShift Pipelines is a cloud-native continuous integration and delivery (CI/CD) solution for building pipelines using [Tekton](https://tekton.dev). Tekton is a flexible Kubernetes-native open-source CI/CD framework which enables automating deployments across multiple platforms (Kubernetes, serverless, VMs, etc) by abstracting away the underlying details.
OpenShift Pipelines is a cloud-native continuous integration and delivery (CI/CD) solution for building pipelines using [Tekton](https://tekton.dev). Tekton is a flexible Kubernetes-native open-source CI/CD framework which enables automating deployments across multiple platforms (Kubernetes, serverless, VMs, etc) by abstracting away the underlying details.
## Features
* Standard CI/CD pipelines definition
Expand Down
4 changes: 2 additions & 2 deletions deploy/resources/v0.3.1/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ spec:
- gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/gsutil@sha256:7ee20ca5428358e766086a217b7d27dba56960dbcb4ce705dd0db3e551cd06fd
- -entrypoint-image
- quay.io/openshift-pipeline/tektoncd-pipeline-entrypoint:v0.3.1
image: quay.io/openshift-pipeline/tektoncd-pipeline-controller:v0.3.1
image: quay.io/openshift-pipeline/tektoncd-pipeline-controller:v0.3.1
name: tekton-pipelines-controller
env:
- name: SYSTEM_NAMESPACE
Expand Down Expand Up @@ -467,7 +467,7 @@ spec:
app: tekton-pipelines-webhook
spec:
containers:
- image: quay.io/openshift-pipeline/tektoncd-pipeline-webhook:v0.3.1
- image: quay.io/openshift-pipeline/tektoncd-pipeline-webhook:v0.3.1
name: webhook
env:
- name: SYSTEM_NAMESPACE
Expand Down
Empty file added gofmt_exclude
Empty file.
6 changes: 3 additions & 3 deletions make/dev.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ deploy-operator: build build-operator-image deploy-operator-only

.PHONY: minikube-start
minikube-start:
minikube start --cpus 4 --memory 8GB \
--extra-config=apiserver.enable-admission-plugins="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook" \
--extra-config=apiserver.service-node-port-range=80-32767
minikube start --cpus 4 --memory 8GB \
--extra-config=apiserver.enable-admission-plugins="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook" \
--extra-config=apiserver.service-node-port-range=80-32767

.PHONY: deploy-all
deploy-all: clean-resources tektoncd-pipeline-operator
Expand Down
18 changes: 12 additions & 6 deletions olm/openshift-pipelines-operator.resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
apiVersion: v1
kind: Namespace
metadata:
name: openshift-pipelines-operator
name: openshift-pipelines-operator
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openshift-pipelines-operator
namespace: openshift-pipelines-operator
name: openshift-pipelines-operator
namespace: openshift-pipelines-operator
spec:
targetNamespaces:
- openshift-pipelines-operator
targetNamespaces:
- openshift-pipelines-operator
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
Expand Down Expand Up @@ -82,6 +82,12 @@ data:
- name: v1alpha1
served: true
storage: true
- apiVersion: tekton.dev/v1alpha1
kind: Install
metadata:
name: example-install
namespace: openshift-pipelines-operator
spec: {}
clusterServiceVersions: |-
- apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
Expand Down Expand Up @@ -166,7 +172,7 @@ data:
path: version
description: |
# OpenShift Pipelines
OpenShift Pipelines is a cloud-native continuous integration and delivery (CI/CD) solution for building pipelines using [Tekton](https://tekton.dev). Tekton is a flexible Kubernetes-native open-source CI/CD framework which enables automating deployments across multiple platforms (Kubernetes, serverless, VMs, etc) by abstracting away the underlying details.
OpenShift Pipelines is a cloud-native continuous integration and delivery (CI/CD) solution for building pipelines using [Tekton](https://tekton.dev). Tekton is a flexible Kubernetes-native open-source CI/CD framework which enables automating deployments across multiple platforms (Kubernetes, serverless, VMs, etc) by abstracting away the underlying details.
## Features
* Standard CI/CD pipelines definition
Expand Down
14 changes: 7 additions & 7 deletions pkg/controller/install/install_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,13 @@ func (r *ReconcileInstall) Reconcile(request reconcile.Request) (reconcile.Resul
if errors.IsNotFound(err) {
// Request object not found, could have been deleted after reconcile request.
// Owned objects are automatically garbage collected. For additional cleanup logic use finalizers.
r.manifest.DeleteAll(
err := r.manifest.DeleteAll(
client.PropagationPolicy(metav1.DeletePropagationForeground),
)
if err != nil {
reqLogger.Error(err, "failed to delete pipeline manifest")
return reconcile.Result{}, err
}
// Return and don't requeue
return reconcile.Result{}, nil
}
Expand Down Expand Up @@ -195,18 +199,17 @@ func isUptodate(instance *tektonv1alpha1.Install) bool {
return true
}

func autoCreateCR(c client.Client, ns string) error {
func autoCreateCR(c client.Client, ns string) {
installList := &tektonv1alpha1.InstallList{}
err := c.List(context.TODO(),
&client.ListOptions{Namespace: ns},
installList,
)
if err != nil {
log.Error(err, "unable to list install instances")
return err
}
if len(installList.Items) > 0 {
return nil
return
}

cr := &tektonv1alpha1.Install{
Expand All @@ -218,10 +221,7 @@ func autoCreateCR(c client.Client, ns string) error {
err = c.Create(context.TODO(), cr)
if err != nil {
log.Error(err, "unable to create install custom resource")
return err
}

return nil
}

func (r *ReconcileInstall) resourceNames() []string {
Expand Down
10 changes: 5 additions & 5 deletions scripts/olm_catalog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ cat <<EOF | sed 's/^ *$//'
apiVersion: v1
kind: Namespace
metadata:
name: openshift-pipelines-operator
name: openshift-pipelines-operator
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openshift-pipelines-operator
namespace: openshift-pipelines-operator
name: openshift-pipelines-operator
namespace: openshift-pipelines-operator
spec:
targetNamespaces:
- openshift-pipelines-operator
targetNamespaces:
- openshift-pipelines-operator
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
Expand Down

0 comments on commit 078446e

Please sign in to comment.