Skip to content

Commit 4904a8d

Browse files
committed
Added test artifacts.
1 parent f308a6a commit 4904a8d

File tree

3 files changed

+50
-13
lines changed

3 files changed

+50
-13
lines changed

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,24 @@ This project contains test sources for various languages, frameworks and tools:
1111

1212
## Bootstrapping
1313

14-
For a simple local setup use the following instructions:
15-
```
16-
$ kubectl testkube init
17-
$ kubectl testkube dashboard
14+
```bash
15+
# For a simple local setup use the following instructions
16+
kubectl testkube init
17+
18+
# to use Testkube Pro setup and connect an agent
19+
# look at the UI for command with correct tokens
20+
testkube pro init --agent-token=tkcagnt_etc.pp --org-id=tkcorg_etc.pp --env-id=tkcenv_etc.pp
1821
```
1922

2023
For a GKE based setup using Flux as GitOps tool, use the following instructions:
2124
```bash
2225
# define required ENV variables for the next steps to work
23-
$ export GITHUB_USER=lreimer
24-
$ export GITHUB_TOKEN=<your-token>
26+
export GITHUB_USER=lreimer
27+
export GITHUB_TOKEN=<your-token>
2528

2629
# setup a GKE cluster with Flux2
27-
$ make create-gke-cluster
28-
$ make bootstrap-flux2
30+
make create-gke-cluster
31+
make bootstrap-flux2
2932

3033
# modify Flux kustomization and add
3134
# - infrastructure-sync.yaml
@@ -36,16 +39,16 @@ $ make bootstrap-flux2
3639
# - image-update-automation.yaml
3740

3841
# if the TestKube Helm release fails to reconciliate
39-
$ flux suspend hr testkube
40-
$ flux resume hr testkube
42+
flux suspend hr testkube
43+
flux resume hr testkube
4144

4245
# you also need to create the webhook for the Git Repository
4346
# Payload URL: http://<LoadBalancerAddress>/<ReceiverURL>
4447
# Secret: the webhook-token value
45-
# $ kubectl -n flux-system get svc/receiver
46-
# $ kubectl -n flux-system get receiver/webapp
48+
# kubectl -n flux-system get svc/receiver
49+
# kubectl -n flux-system get receiver/webapp
4750

48-
$ make delete-gke-cluster
51+
make delete-gke-cluster
4952
```
5053

5154
## TestKube UI and CLI
@@ -161,6 +164,7 @@ kubectl testkube run testsuite hands-on-testkube
161164

162165
# alternatively, create test suite via GitOps
163166
# see k8s/applications/testsuite.yaml
167+
# this uses the new test workflow CRD
164168
```
165169

166170
## GitHub Actions Example

k8s/applications/gradle-demo/gradle-test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,12 @@ spec:
1414
uri: https://github.com/lreimer/hands-on-testkube.git
1515
container:
1616
workingDir: /data/repo
17+
job:
18+
activeDeadlineSeconds: 60
19+
steps:
20+
- name: Saving artifacts
21+
condition: always
22+
artifacts:
23+
paths:
24+
- build/test-results/test/**
1725
status: {}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
kind: TestWorkflow
2+
apiVersion: testworkflows.testkube.io/v1
3+
metadata:
4+
name: maven-test
5+
labels:
6+
docs: example
7+
testkube.io/name: Maven
8+
testkube.io/group: demo
9+
spec:
10+
content:
11+
git:
12+
uri: https://github.com/lreimer/hands-on-testkube.git
13+
use:
14+
- name: official/maven/v1
15+
config: {}
16+
container:
17+
workingDir: /data/repo
18+
job:
19+
activeDeadlineSeconds: 60
20+
steps:
21+
- name: Saving artifacts
22+
condition: always
23+
artifacts:
24+
paths:
25+
- target/surefire-reports/**

0 commit comments

Comments
 (0)