3
3
pull_request_target :
4
4
types :
5
5
- labeled
6
+
7
+ env :
8
+ A8R_AGENT_REGISTRY : ' localhost:5000'
9
+
6
10
jobs :
7
11
build-image :
8
12
runs-on : ubuntu-latest
@@ -22,69 +26,35 @@ jobs:
22
26
uses : actions/setup-go@v3
23
27
with :
24
28
go-version : stable
25
- - name : Build image
26
- run : |
27
- make image-tar
28
- - name : Upload image
29
- uses : actions/upload-artifact@v3
30
- with :
31
- name : image
32
- path : build-output/ambassador-agent-image.tar
33
- test :
34
- runs-on : ubuntu-latest
35
- needs : build-image
36
- steps :
37
- - name : Checkout
38
- uses : actions/checkout@v3
39
- with :
40
- fetch-depth : 0
41
- ref : " ${{ github.event.pull_request.head.sha }}"
42
- - name : Get last run
43
- uses : ./.github/actions/rerun-cache
44
- id : get_last_run
45
- - name : Setup Go
46
- uses : actions/setup-go@v3
47
- with :
48
- go-version : stable
49
29
- name : Setup kubectl
50
30
uses : azure/setup-kubectl@v3
51
31
id : kubectl
52
- if : steps.get_last_run.outputs.passed != 'success'
53
- - name : Download image
54
- uses : actions/download-artifact@v3
55
- if : steps.get_last_run.outputs.passed != 'success'
56
- with :
57
- name : image
58
- - name : Prepare kluster
59
- uses : ./.github/actions/prepare-kluster
60
- if : steps.get_last_run.outputs.passed != 'success'
32
+ - name : Provision Kubeception cluster
61
33
id : kluster
34
+ uses :
datawire/infra-actions/[email protected]
62
35
with :
63
- token : ${{ secrets.DEV_AMBASSADOR_AGENT_KUBECEPTION_TOKEN }}
64
- image-tar : ambassador-agent-image.tar
65
- github-sha : ${{ github.event.pull_request.head.sha }}
36
+ distribution : Kubeception
37
+ version : 1.26
38
+ kubeconfig : ${{ env.KUBECONFIG }}
39
+ kubeceptionToken : ${{ secrets.DEV_AMBASSADOR_AGENT_KUBECEPTION_TOKEN }}
40
+ gke-credentials : ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
41
+ - name : Build image
42
+ id : build
43
+ run : |
44
+ make push-image
45
+ echo "version=$(cat build-output/version.txt)" >> $GITHUB_OUTPUT
66
46
- name : Run tests
67
- if : steps.get_last_run.outputs.passed != 'success'
68
47
uses : nick-invision/retry@v2
48
+ env :
49
+ A8R_AGENT_VERSION : ${{ steps.build.outputs.version }}
50
+ AMBASSADOR_AGENT_DOCKER_IMAGE : localhost:5000/ambassador-agent:${{ steps.build.outputs.version }}
51
+ KAT_SERVER_DOCKER_IMAGE : docker.io/datawiredev/kat-server:3.0.1-0.20220817135951-2cb28ef4f415
69
52
with :
70
53
max_attempts : 3
71
54
timeout_minutes : 15
72
55
command : |
73
- export DTEST_KUBECONFIG=${{ steps.kluster.outputs.kubeconfig }}
74
- export KUBECONFIG=${{ steps.kluster.outputs.kubeconfig }}
75
- export AMBASSADOR_AGENT_DOCKER_IMAGE=datawiredev/ambassador-agent:dev-latest
76
- export KAT_SERVER_DOCKER_IMAGE=docker.io/datawiredev/kat-server:3.0.1-0.20220817135951-2cb28ef4f415
77
56
make go-integration-test
57
+ - name : Add a private image registry to the cluster
58
+ run : make private-registry
78
59
- name : Mark test as succesfull
79
60
run : echo "::set-output name=run_result::success" > run_result
80
- - name : Cleanup kluster
81
- uses : ./.github/actions/cleanup-kluster
82
- if : always()
83
- with :
84
- token : ${{ secrets.DEV_AMBASSADOR_AGENT_KUBECEPTION_TOKEN }}
85
- github-sha : ${{ github.event.pull_request.head.sha }}
86
-
87
-
88
-
89
-
90
-
0 commit comments