-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added 0.2 of conftest #1292
added 0.2 of conftest #1292
Conversation
Hi @garethahealy. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind feature |
Diff between version 0.1 and 0.2diff --git a/task/conftest/0.1/conftest.yaml b/task/conftest/0.2/conftest.yaml
index 9b59d89..904473e 100644
--- a/task/conftest/0.1/conftest.yaml
+++ b/task/conftest/0.2/conftest.yaml
@@ -1,13 +1,14 @@
-apiVersion: tekton.dev/v1beta1
+apiVersion: tekton.dev/v1
kind: Task
metadata:
name: conftest
labels:
- app.kubernetes.io/version: "0.1"
+ app.kubernetes.io/version: "0.2"
annotations:
- tekton.dev/pipelines.minVersion: "0.12.1"
- tekton.dev/categories: Testing
- tekton.dev/tags: test
+ tekton.dev/pipelines.minVersion: "0.56.1"
+ tekton.dev/displayName: "conftest"
+ tekton.dev/categories: Developer Tools
+ tekton.dev/tags: jq
tekton.dev/platforms: "linux/amd64"
spec:
description: >-
@@ -16,22 +17,22 @@ spec:
Conftest is a tool for testing configuration files using Open Policy Agent.
workspaces:
- - name: source
+ - name: source
params:
- - name: files
- type: string
- - name: policy
- default: "policy"
- - name: output
- default: "stdout"
- - name: args
- type: array
- default: []
+ - name: files
+ type: string
+ - name: policy
+ default: "policy"
+ - name: output
+ default: "stdout"
+ - name: args
+ type: array
+ default: []
steps:
- name: conftest
workingDir: $(workspaces.source.path)
- image: docker.io/instrumenta/conftest:v0.21.0@sha256:7da62b227612d5cf50d6de80db740b77bcfb7fd52b2e1aa679dd9edd692fec21 #tag: v0.21.0
+ image: docker.io/openpolicyagent/conftest:v0.54.0@sha256:094e3bc9af439d16d15379bff9fc3aec0d558936aa1ac1e0574c0dcfa1c43e86 #tag: v0.54.0
command:
- conftest
- test |
Diff between version 0.1 and 0.2diff --git a/task/conftest/0.1/README.md b/task/conftest/0.2/README.md
index 05ec4c9..071c533 100644
--- a/task/conftest/0.1/README.md
+++ b/task/conftest/0.2/README.md
@@ -8,7 +8,7 @@ your Tekton pipelines. Conftest is a tool for testing configuration files using
In order to use Conftest with Tekton you need to first install the task.
```console
-kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/conftest/0.1/raw
+kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/conftest/0.2/raw
```
## Platforms
@@ -20,7 +20,7 @@ The Task can be run on `linux/amd64` platform.
Once installed, the task can be used as follows:
```yaml
-apiVersion: tekton.dev/v1beta1
+apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
name: conftest-example
@@ -38,7 +38,7 @@ spec:
value: examples/kubernetes/policy
```
-Note that the above respository contains both a configuration file we want to test (`examples/kubernetes/deployment.yaml`) and a directory (`examples/kubernetes/policy`) containing OPA policy files. When using the task you would provide the details of the repository you want to test.
+Note that the above repository contains both a configuration file we want to test (`examples/kubernetes/deployment.yaml`) and a directory (`examples/kubernetes/policy`) containing OPA policy files. When using the task you would provide the details of the repository you want to test.
If you apply the above `TaskRun` you can see the output in the `taskrun` logs. For example:
diff --git a/task/conftest/0.1/conftest.yaml b/task/conftest/0.2/conftest.yaml
index 9b59d89..904473e 100644
--- a/task/conftest/0.1/conftest.yaml
+++ b/task/conftest/0.2/conftest.yaml
@@ -1,13 +1,14 @@
-apiVersion: tekton.dev/v1beta1
+apiVersion: tekton.dev/v1
kind: Task
metadata:
name: conftest
labels:
- app.kubernetes.io/version: "0.1"
+ app.kubernetes.io/version: "0.2"
annotations:
- tekton.dev/pipelines.minVersion: "0.12.1"
- tekton.dev/categories: Testing
- tekton.dev/tags: test
+ tekton.dev/pipelines.minVersion: "0.56.1"
+ tekton.dev/displayName: "conftest"
+ tekton.dev/categories: Developer Tools
+ tekton.dev/tags: jq
tekton.dev/platforms: "linux/amd64"
spec:
description: >-
@@ -16,22 +17,22 @@ spec:
Conftest is a tool for testing configuration files using Open Policy Agent.
workspaces:
- - name: source
+ - name: source
params:
- - name: files
- type: string
- - name: policy
- default: "policy"
- - name: output
- default: "stdout"
- - name: args
- type: array
- default: []
+ - name: files
+ type: string
+ - name: policy
+ default: "policy"
+ - name: output
+ default: "stdout"
+ - name: args
+ type: array
+ default: []
steps:
- name: conftest
workingDir: $(workspaces.source.path)
- image: docker.io/instrumenta/conftest:v0.21.0@sha256:7da62b227612d5cf50d6de80db740b77bcfb7fd52b2e1aa679dd9edd692fec21 #tag: v0.21.0
+ image: docker.io/openpolicyagent/conftest:v0.54.0@sha256:094e3bc9af439d16d15379bff9fc3aec0d558936aa1ac1e0574c0dcfa1c43e86 #tag: v0.54.0
command:
- conftest
- test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vinamra28 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
added 0.2 of contest as 0.1 was using a very old image / old api
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
contains
/kind <type>
. Valid types are bug, cleanup, design, documentation,feature, flake, misc, question, tep
File path follows
<kind>/<name>/<version>/name.yaml
Has
README.md
at<kind>/<name>/<version>/README.md
Has mandatory
metadata.labels
-app.kubernetes.io/version
the same as the<version>
of the resourceHas mandatory
metadata.annotations
tekton.dev/pipelines.minVersion
mandatory
spec.description
follows the conventionSee the contribution guide for more details.