Skip to content

Commit c4359fd

Browse files
committed
Updating README and Tekton resource
1 parent f44d862 commit c4359fd

18 files changed

+480
-140
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It allows to launch tests with minimal dependencies.
66

77
## Build Status
88

9-
Current development version is `0.3.0-SNAPSHOT`. [![Build Status](https://travis-ci.org/microcks/microcks-cli.png?branch=master)](https://travis-ci.org/microcks/microcks-cli)
9+
Current development version is `0.4.0-SNAPSHOT`. [![Build Status](https://travis-ci.org/microcks/microcks-cli.png?branch=master)](https://travis-ci.org/microcks/microcks-cli)
1010

1111
## Usage instructions
1212

@@ -83,5 +83,12 @@ The `microcks-cli` is now available as a container image as version `0.2.0`. So
8383
Below a sample on how using the image without getting the CLI binary:
8484

8585
```
86-
$ docker run -it microcks/microcks-cli:latest microcks-cli test 'Beer Catalog API:0.9' http://beer-catalog-impl-beer-catalog-dev.apps.144.76.24.92.nip.io/api/ POSTMAN --microcksURL=http://microcks.apps.144.76.24.92.nip.io/api/ --keycloakClientId=microcks-serviceaccount --keycloakClientSecret=7deb71e8-8c80-4376-95ad-00a399ee3ca1 --waitFor=8sec --operationsHeaders='{"globals": [{"name": "x-api-key", "values": "my-values"}], "GET /beer": [{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}]}'
87-
```
86+
$ docker run -it quay.io/microcks/microcks-cli:latest microcks-cli test 'Beer Catalog API:0.9' http://beer-catalog-impl-beer-catalog-dev.apps.144.76.24.92.nip.io/api/ POSTMAN --microcksURL=http://microcks.apps.144.76.24.92.nip.io/api/ --keycloakClientId=microcks-serviceaccount --keycloakClientSecret=7deb71e8-8c80-4376-95ad-00a399ee3ca1 --waitFor=8sec --operationsHeaders='{"globals": [{"name": "x-api-key", "values": "my-values"}], "GET /beer": [{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}]}'
87+
```
88+
89+
> Previous versions of the `microcks-cli` container image (< `0.3.0`) where hosted on Docker Hub and you can retrieve them using `microcks/microcks:0.2.0` version for example.
90+
91+
92+
## Tekton tasks
93+
94+
This repository also contains different [Tekton](https://tekton.dev/) tasks definition and sample pipelines. You'll find under the `/tekton` folder the resource for current `v1beta1` Tekton API version and the older `v1alpha1` under `tekton/v1alpha1`.

tekton/echo-hello-world-task.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: tekton.dev/v1alpha1
1+
apiVersion: tekton.dev/v1beta1
22
kind: Task
33
metadata:
44
name: echo-hello-world

tekton/microcks-pipeline-beer-catalog.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: tekton.dev/v1alpha1
1+
apiVersion: tekton.dev/v1beta1
22
kind: Pipeline
33
metadata:
44
name: microcks-pipeline-beer-catalog

tekton/microcks-pipelinerun-beer-catalog.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: tekton.dev/v1alpha1
1+
apiVersion: tekton.dev/v1beta1
22
kind: PipelineRun
33
metadata:
44
name: microcks-pipelinerun-beer-catalog
Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,42 @@
1-
apiVersion: tekton.dev/v1alpha1
1+
apiVersion: tekton.dev/v1beta1
22
kind: Task
33
metadata:
44
name: microcks-test-customcerts
55
spec:
6-
inputs:
7-
params:
8-
- name: apiNameAndVersion
9-
type: string
10-
description: "<apiName:apiVersion>: Service to test reference. Exemple: 'Beer Catalog API:0.9'"
11-
default: "Beer Catalog API:0.9"
12-
- name: testEndpoint
13-
type: string
14-
description: "URL where is deployed implementation to test"
15-
- name: runner
16-
type: string
17-
description: "Test strategy (one of: HTTP, SOAP, SOAP_UI, POSTMAN, OPEN_API_SCHEMA)"
18-
default: HTTP
19-
- name: microcksURL
20-
type: string
21-
description: "Microcks instance API endpoint"
22-
- name: keycloakClientId
23-
type: string
24-
description: "Keycloak Realm Service Account ClientId"
25-
default: microcks-serviceaccount
26-
- name: keycloakClientSecret
27-
type: string
28-
description: "Keycloak Realm Service Account ClientSecret"
29-
default: 7deb71e8-8c80-4376-95ad-00a399ee3ca1
30-
- name: waitFor
31-
type: string
32-
description: "Time to wait for test to finish (int + one of: milli, sec, min)"
33-
default: 5sec
34-
- name: operationsHeaders
35-
type: string
36-
description: "JSON that override some operations headers for the tests to launch"
37-
default: ""
38-
- name: caCertsSecret
39-
type: string
40-
description: "Paths to additional certificates CRT files to add to trusted roots ones"
6+
params:
7+
- name: apiNameAndVersion
8+
type: string
9+
description: "<apiName:apiVersion>: Service to test reference. Exemple: 'Beer Catalog API:0.9'"
10+
default: "Beer Catalog API:0.9"
11+
- name: testEndpoint
12+
type: string
13+
description: "URL where is deployed implementation to test"
14+
- name: runner
15+
type: string
16+
description: "Test strategy (one of: HTTP, SOAP, SOAP_UI, POSTMAN, OPEN_API_SCHEMA)"
17+
default: HTTP
18+
- name: microcksURL
19+
type: string
20+
description: "Microcks instance API endpoint"
21+
- name: keycloakClientId
22+
type: string
23+
description: "Keycloak Realm Service Account ClientId"
24+
default: microcks-serviceaccount
25+
- name: keycloakClientSecret
26+
type: string
27+
description: "Keycloak Realm Service Account ClientSecret"
28+
default: 7deb71e8-8c80-4376-95ad-00a399ee3ca1
29+
- name: waitFor
30+
type: string
31+
description: "Time to wait for test to finish (int + one of: milli, sec, min)"
32+
default: 5sec
33+
- name: operationsHeaders
34+
type: string
35+
description: "JSON that override some operations headers for the tests to launch"
36+
default: ""
37+
- name: caCertsSecret
38+
type: string
39+
description: "Paths to additional certificates CRT files to add to trusted roots ones"
4140
steps:
4241
- name: microcks-test
4342
image: quay.io/microcks/microcks-cli:0.3.0
@@ -49,11 +48,11 @@ spec:
4948
args:
5049
- '-c'
5150
- >-
52-
microcks-cli test '$(inputs.params.apiNameAndVersion)' $(inputs.params.testEndpoint) $(inputs.params.runner) \
53-
--microcksURL=$(inputs.params.microcksURL) --waitFor=$(inputs.params.waitFor) \
54-
--keycloakClientId=$(inputs.params.keycloakClientId) --keycloakClientSecret=$(inputs.params.keycloakClientSecret) \
55-
--caCerts=/var/run/secrets/customcerts/ca.crt --operationsHeaders='$(inputs.params.operationsHeaders)'
51+
microcks-cli test '$(params.apiNameAndVersion)' $(params.testEndpoint) $(params.runner) \
52+
--microcksURL=$(params.microcksURL) --waitFor=$(params.waitFor) \
53+
--keycloakClientId=$(params.keycloakClientId) --keycloakClientSecret=$(params.keycloakClientSecret) \
54+
--caCerts=/var/run/secrets/customcerts/ca.crt --operationsHeaders='$(params.operationsHeaders)'
5655
volumes:
5756
- name: microcks-test-customcerts
5857
secret:
59-
secretName: $(inputs.params.caCertsSecret)
58+
secretName: $(params.caCertsSecret)
Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
1-
apiVersion: tekton.dev/v1alpha1
1+
apiVersion: tekton.dev/v1beta1
22
kind: TaskRun
33
metadata:
44
name: microcks-test-customcerts-taskrun-beer-catalog
55
spec:
66
taskRef:
77
name: microcks-test-customcerts
8-
inputs:
9-
params:
10-
- name: apiNameAndVersion
11-
value: "Beer Catalog API:0.9"
12-
- name: testEndpoint
13-
value: http://beer-catalog-impl-beer-catalog-dev.apps.144.76.24.92.nip.io/api/
14-
- name: runner
15-
value: POSTMAN
16-
- name: microcksURL
17-
value: https://microcks-secure.apps.144.76.24.92.nip.io/api/
18-
- name: waitFor
19-
value: 12sec
20-
- name: keycloakClientId
21-
value: microcks-serviceaccount
22-
- name: keycloakClientSecret
23-
value: 34a49089-7566-45a0-88a6-112b297fd803
24-
- name: operationsHeaders
25-
value: |-
26-
{
27-
"globals": [
28-
{"name": "x-api-key", "values": "my-values"}
29-
],
30-
"GET /beer": [
31-
{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}
32-
]
33-
}
34-
- name: caCertsSecret
35-
value: microcks-test-customcerts-secret
8+
params:
9+
- name: apiNameAndVersion
10+
value: "Beer Catalog API:0.9"
11+
- name: testEndpoint
12+
value: http://beer-catalog-impl-beer-catalog-dev.apps.144.76.24.92.nip.io/api/
13+
- name: runner
14+
value: POSTMAN
15+
- name: microcksURL
16+
value: https://microcks-secure.apps.144.76.24.92.nip.io/api/
17+
- name: waitFor
18+
value: 12sec
19+
- name: keycloakClientId
20+
value: microcks-serviceaccount
21+
- name: keycloakClientSecret
22+
value: 34a49089-7566-45a0-88a6-112b297fd803
23+
- name: operationsHeaders
24+
value: |-
25+
{
26+
"globals": [
27+
{"name": "x-api-key", "values": "my-values"}
28+
],
29+
"GET /beer": [
30+
{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}
31+
]
32+
}
33+
- name: caCertsSecret
34+
value: microcks-test-customcerts-secret

tekton/microcks-test-task.yaml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
1-
apiVersion: tekton.dev/v1alpha1
1+
apiVersion: tekton.dev/v1beta1
22
kind: Task
33
metadata:
44
name: microcks-test
55
spec:
6-
inputs:
7-
params:
8-
- name: apiNameAndVersion
9-
type: string
10-
description: "<apiName:apiVersion>: Service to test reference. Exemple: 'Beer Catalog API:0.9'"
11-
default: "Beer Catalog API:0.9"
12-
- name: testEndpoint
13-
type: string
14-
description: "URL where is deployed implementation to test"
15-
- name: runner
16-
type: string
17-
description: "Test strategy (one of: HTTP, SOAP, SOAP_UI, POSTMAN, OPEN_API_SCHEMA)"
18-
default: HTTP
19-
- name: microcksURL
20-
type: string
21-
description: "Microcks instance API endpoint"
22-
- name: keycloakClientId
23-
type: string
24-
description: "Keycloak Realm Service Account ClientId"
25-
default: microcks-serviceaccount
26-
- name: keycloakClientSecret
27-
type: string
28-
description: "Keycloak Realm Service Account ClientSecret"
29-
default: 7deb71e8-8c80-4376-95ad-00a399ee3ca1
30-
- name: waitFor
31-
type: string
32-
description: "Time to wait for test to finish (int + one of: milli, sec, min)"
33-
default: 5sec
34-
- name: operationsHeaders
35-
type: string
36-
description: "JSON that override some operations headers for the tests to launch"
37-
default: ""
6+
params:
7+
- name: apiNameAndVersion
8+
type: string
9+
description: "<apiName:apiVersion>: Service to test reference. Exemple: 'Beer Catalog API:0.9'"
10+
default: "Beer Catalog API:0.9"
11+
- name: testEndpoint
12+
type: string
13+
description: "URL where is deployed implementation to test"
14+
- name: runner
15+
type: string
16+
description: "Test strategy (one of: HTTP, SOAP, SOAP_UI, POSTMAN, OPEN_API_SCHEMA, ASYNC_API_SCHEMA)"
17+
default: HTTP
18+
- name: microcksURL
19+
type: string
20+
description: "Microcks instance API endpoint"
21+
- name: keycloakClientId
22+
type: string
23+
description: "Keycloak Realm Service Account ClientId"
24+
default: microcks-serviceaccount
25+
- name: keycloakClientSecret
26+
type: string
27+
description: "Keycloak Realm Service Account ClientSecret"
28+
default: 7deb71e8-8c80-4376-95ad-00a399ee3ca1
29+
- name: waitFor
30+
type: string
31+
description: "Time to wait for test to finish (int + one of: milli, sec, min)"
32+
default: 5sec
33+
- name: operationsHeaders
34+
type: string
35+
description: "JSON that override some operations headers for the tests to launch"
36+
default: ""
3837
steps:
3938
- name: microcks-test
4039
image: quay.io/microcks/microcks-cli:0.3.0
@@ -43,7 +42,7 @@ spec:
4342
args:
4443
- '-c'
4544
- >-
46-
microcks-cli test '$(inputs.params.apiNameAndVersion)' $(inputs.params.testEndpoint) $(inputs.params.runner) \
47-
--microcksURL=$(inputs.params.microcksURL) --waitFor=$(inputs.params.waitFor) \
48-
--keycloakClientId=$(inputs.params.keycloakClientId) --keycloakClientSecret=$(inputs.params.keycloakClientSecret) \
49-
--insecure --operationsHeaders='$(inputs.params.operationsHeaders)'
45+
microcks-cli test '$(params.apiNameAndVersion)' $(params.testEndpoint) $(params.runner) \
46+
--microcksURL=$(params.microcksURL) --waitFor=$(params.waitFor) \
47+
--keycloakClientId=$(params.keycloakClientId) --keycloakClientSecret=$(params.keycloakClientSecret) \
48+
--insecure --operationsHeaders='$(params.operationsHeaders)'
Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
apiVersion: tekton.dev/v1alpha1
1+
apiVersion: tekton.dev/v1beta1
22
kind: TaskRun
33
metadata:
44
name: microcks-test-taskrun-beer-catalog
55
spec:
66
taskRef:
77
name: microcks-test
8-
inputs:
9-
params:
10-
- name: apiNameAndVersion
11-
value: "Beer Catalog API:0.9"
12-
- name: testEndpoint
13-
value: http://beer-catalog-impl-beer-catalog-dev.apps.144.76.24.92.nip.io/api/
14-
- name: runner
15-
value: POSTMAN
16-
- name: microcksURL
17-
value: http://microcks.apps.144.76.24.92.nip.io/api/
18-
- name: waitFor
19-
value: 12sec
20-
- name: keycloakClientId
21-
value: microcks-serviceaccount
22-
- name: keycloakClientSecret
23-
value: 34a49089-7566-45a0-88a6-112b297fd803
24-
- name: operationsHeaders
25-
value: |-
26-
{
27-
"globals": [
28-
{"name": "x-api-key", "values": "my-values"}
29-
],
30-
"GET /beer": [
31-
{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}
32-
]
33-
}
8+
params:
9+
- name: apiNameAndVersion
10+
value: "Beer Catalog API:0.9"
11+
- name: testEndpoint
12+
value: http://beer-catalog-impl-beer-catalog-dev.apps.144.76.24.92.nip.io/api/
13+
- name: runner
14+
value: POSTMAN
15+
- name: microcksURL
16+
value: http://microcks.apps.144.76.24.92.nip.io/api/
17+
- name: waitFor
18+
value: 12sec
19+
- name: keycloakClientId
20+
value: microcks-serviceaccount
21+
- name: keycloakClientSecret
22+
value: 34a49089-7566-45a0-88a6-112b297fd803
23+
- name: operationsHeaders
24+
value: |-
25+
{
26+
"globals": [
27+
{"name": "x-api-key", "values": "my-values"}
28+
],
29+
"GET /beer": [
30+
{"name": "x-trace-id", "values": "xcvbnsdfghjklm"}
31+
]
32+
}

0 commit comments

Comments
 (0)