18
18
# see https://github.com/devstream-io/devstream/pull/414 for more info
19
19
GITHUB_TOKEN : ${{ secrets.E2E_GITHUB_TOKEN }}
20
20
DOCKERHUB_USERNAME : ${{ secrets.E2E_DOCKERHUB_USERNAME }}
21
+ # for github actions
21
22
DOCKERHUB_TOKEN : ${{ secrets.E2E_DOCKERHUB_TOKEN }}
22
- TRELLO_API_KEY : ${{ secrets.E2E_TRELLO_API_KEY }}
23
- TRELLO_TOKEN : ${{ secrets.E2E_TRELLO_TOKEN }}
23
+ # for apps
24
+ IMAGE_REPO_PASSWORD : ${{ secrets.E2E_DOCKERHUB_TOKEN }}
24
25
25
26
concurrency :
26
27
group : ${{ github.workflow }}
39
40
runs-on : [self-hosted, linux, X64]
40
41
name : e2e-test-${{ matrix.os }}
41
42
steps :
42
- - run : echo "🐧 This job is now running on a ${{ runner.os }}-${{ runner.arch }} server hosted by GitHub!"
43
43
- name : Checkout
44
44
uses : actions/checkout@v3
45
45
- name : Setup Golang env
@@ -65,24 +65,33 @@ jobs:
65
65
- name : Configure EKS credentials
66
66
run : |
67
67
aws eks update-kubeconfig --region ap-southeast-1 --name dtm-test
68
- - name : copy config files
69
- run : cp ./test/e2e/yaml/e2e-*.yaml ./
70
- - name : apply git-ops
71
- run : ./dtm apply -f e2e-config.yaml -y
72
- - name : apply twice git-ops
73
- run : ./dtm apply -f e2e-config.yaml -y
74
- - name : install kubectl
68
+ - name : Install kubectl
75
69
run : |
76
70
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.22.0/bin/linux/amd64/kubectl
77
71
chmod +x ./kubectl
78
72
sudo mv ./kubectl /usr/local/bin/kubectl
79
- - name : check if pod is ready
73
+ - name : copy config files
74
+ run : cp ./test/e2e/yaml/e2e-*.yaml ./
75
+ - name : test 1 - apply git-ops (tools only)
76
+ run : ./dtm apply -f e2e-tools.yaml -y
77
+ - name : test 1 - apply git-ops (tools only) again
78
+ run : ./dtm apply -f e2e-tools.yaml -y
79
+ - name : test 1 - check if pod is ready
80
+ run : while [[ $(kubectl get pods -l app=dtme2epython -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "pod not ready yet..."; sleep 3; done
81
+ timeout-minutes : 10
82
+ - name : test 1 - verify
83
+ run : ./dtm verify -f e2e-tools.yaml
84
+ - name : test 1 - clean
85
+ run : ./dtm delete -f e2e-tools.yaml -y
86
+ - name : test 2 - apply (apps)
87
+ run : ./dtm apply -f e2e-apps.yaml -y
88
+ - name : test 2 - apply (apps) again
89
+ run : ./dtm apply -f e2e-apps.yaml -y
90
+ - name : test 2 - check if pod is ready
80
91
run : while [[ $(kubectl get pods -l app=dtm-e2e-go -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "pod not ready yet..."; sleep 3; done
81
92
timeout-minutes : 10
82
- - name : verify
83
- run : ./dtm verify -f e2e-config.yaml
84
- - name : clean
85
- run : ./dtm delete -f e2e-config.yaml -y
93
+ - name : test 2 - clean
94
+ run : ./dtm delete -f e2e-apps.yaml -y
86
95
- name : test e2e success or not
87
96
if : failure()
88
97
run : |
0 commit comments