Skip to content

Commit 9cc50e4

Browse files
authored
Merge pull request #22 from christophd/backport/1.8.x
[Backport-1.8.x] Backport changes from 1.8.x
2 parents 5ae5936 + 3a1cdfb commit 9cc50e4

File tree

4 files changed

+38
-15
lines changed

4 files changed

+38
-15
lines changed

.github/workflows/kubernetes.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@ on:
2222
branches:
2323
- main
2424
- 1.6.x
25+
- 1.8.x
2526
push:
2627
branches:
2728
- main
2829
- 1.6.x
30+
- 1.8.x
2931

3032
jobs:
3133
test:
3234
runs-on: ubuntu-latest
3335
env:
36+
CAMEL_K_VERSION: latest
37+
YAKS_VERSION: 0.10.0
3438
YAKS_IMAGE_NAME: "docker.io/citrusframework/yaks"
35-
YAKS_VERSION: "0.7.0"
3639
YAKS_RUN_OPTIONS: "--timeout=15m"
3740
KUBECTL_WAIT_TIMEOUT: "180s"
3841
steps:
@@ -72,6 +75,8 @@ jobs:
7275
kubectl describe nodes
7376
- name: Camel K Tools
7477
uses: container-tools/camel-k-action@v1
78+
with:
79+
version: ${{ env.CAMEL_K_VERSION }}
7580
- name: Install Camel K
7681
run: |
7782
# Configure install options
@@ -91,3 +96,12 @@ jobs:
9196
run: |
9297
# Then run integration tests
9398
yaks run test/service-api.feature $YAKS_RUN_OPTIONS
99+
- name: YAKS Report
100+
if: failure()
101+
run: |
102+
yaks report
103+
- uses: actions/upload-artifact@v2
104+
if: failure()
105+
with:
106+
name: dumps
107+
path: _output/*-dump.log

readme.didact.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,18 @@ To run the integration, you need to link it to the proper configuration, that de
179179
As alternative, to connect the integration to the **test Minio server** deployed before:
180180

181181
```
182-
kamel run API.java --open-api openapi.yaml --property file:test/minio.properties
182+
kamel run API.java --open-api file:openapi.yaml --property file:test/minio.properties
183183
```
184-
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--open-api%20openapi.yaml%20--property=file%3Atest/minio.properties&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
184+
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--open-api%20file%3Aopenapi.yaml%20--property=file%3Atest/minio.properties&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
185185

186186
### 4.2 [Alternative 2] Using the S3 service
187187

188188
To connect the integration to the **AWS S3 service**:
189189

190190
```
191-
kamel run API.java --open-api openapi.yaml --property file:s3.properties
191+
kamel run API.java --open-api file:openapi.yaml --property file:s3.properties
192192
```
193-
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--open-api%20openapi.yaml%20--property=file%3As3.properties&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
193+
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--open-api%20file%3Aopenapi.yaml%20--property=file%3As3.properties&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
194194

195195

196196
## 5. Using the API
@@ -300,18 +300,18 @@ and manage it. This process is accomplished via the `3scale` trait in Camel K.
300300
As alternative, to connect the integration to the **test Minio server**:
301301

302302
```
303-
kamel run API.java --property file:test/minio.properties --open-api openapi.yaml -t 3scale.enabled=true -t 3scale.description-path=/openapi.json --profile OpenShift
303+
kamel run API.java --property file:test/minio.properties --open-api file:openapi.yaml -t 3scale.enabled=true -t 3scale.description-path=/openapi.json --profile OpenShift
304304
```
305-
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--property=file%3Atest%2Fminio.properties%20--open-api%20openapi.yaml%20-t%203scale.enabled%3Dtrue%20-t%203scale.description-path%3D%2Fopenapi.json%20--profile%20OpenShift&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
305+
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--property=file%3Atest%2Fminio.properties%20--open-api%20file%3Aopenapi.yaml%20-t%203scale.enabled%3Dtrue%20-t%203scale.description-path%3D%2Fopenapi.json%20--profile%20OpenShift&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
306306

307307
### 7.2 [Alternative 2] Using the S3 service
308308

309309
To connect the integration to the **AWS S3 service**:
310310

311311
```
312-
kamel run API.java --property file:s3.properties --open-api openapi.yaml -t 3scale.enabled=true -t 3scale.description-path=/openapi.json --profile OpenShift
312+
kamel run API.java --property file:s3.properties --open-api file:openapi.yaml -t 3scale.enabled=true -t 3scale.description-path=/openapi.json --profile OpenShift
313313
```
314-
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--property=file%3As3.properties%20--open-api%20openapi.yaml%20-t%203scale.enabled%3Dtrue%20-t%203scale.description-path%3D%2Fopenapi.json%20--profile%20OpenShift&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
314+
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--property=file%3As3.properties%20--open-api%20file%3Aopenapi.yaml%20-t%203scale.enabled%3Dtrue%20-t%203scale.description-path%3D%2Fopenapi.json%20--profile%20OpenShift&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
315315

316316

317317
After the integration is updated, when looking in the 3scale API manager, you should find the new service.

test/service-api.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ Feature: Service API allows CRUD operations on S3 bucket
99
Then wait for Kubernetes pod labeled with app=minio
1010

1111
Scenario: Create transformations integration
12-
Given Camel-K resource polling configuration
12+
Given Camel K resource polling configuration
1313
| maxAttempts | 200 |
1414
| delayBetweenAttempts | 2000 |
15-
Given Camel-K integration property file minio.properties
16-
When load Camel-K integration API.java with configuration
15+
Given Camel K integration property file minio.properties
16+
When load Camel K integration API.java with configuration
1717
| openapi | openapi.yaml |
1818
| dependencies | camel:openapi-java |
19-
Then Camel-K integration api should be running
19+
Then Camel K integration api should be running
2020
And wait for GET on path /v1
2121

2222
Scenario: LIST objects
@@ -75,6 +75,6 @@ Feature: Service API allows CRUD operations on S3 bucket
7575
Then expect HTTP response body loaded from openapi.yaml
7676
Then receive HTTP 200 OK
7777

78-
Scenario: Remove Camel-K integrations
79-
Given delete Camel-K integration api
78+
Scenario: Remove Camel K integrations
79+
Given delete Camel K integration api
8080
And delete Kubernetes resource minio.yaml

test/yaks-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@ config:
1212
- ../openapi.yaml
1313
- minio.yaml
1414
- minio.properties
15+
dump:
16+
enabled: true
17+
failedOnly: true
18+
includes:
19+
- app=camel-k
1520
pre:
1621
- name: RBAC setup
1722
if: env:CI=true
1823
run: |
1924
yaks role --add infra/role-minio.yaml
2025
yaks role --add infra/role-binding-minio.yaml
26+
post:
27+
- name: print dump
28+
if: env:CI=true && failure()
29+
run: kamel dump

0 commit comments

Comments
 (0)