File tree 8 files changed +75
-4
lines changed
8 files changed +75
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : e2e
2
2
3
3
on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - main
4
8
workflow_dispatch :
5
9
6
10
jobs :
9
13
steps :
10
14
- name : Checkout
11
15
12
- - name : Setup
16
+ - name : Setup | Go
13
17
14
18
with :
15
19
go-version : 1.20.x
16
- - name : Prepare
20
+ - name : Setup | Kubernetes Cluster
21
+
22
+ with :
23
+ version : v0.18.0
24
+ cluster_name : pipeline-controller
25
+ node_image : kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f
26
+ - name : Setup | Flux
27
+ run : curl -s https://fluxcd.io/install.sh | sudo bash
28
+ - name : Prepare | Go # .netrc is used by docker-build, ~/.netrc is used by go test
29
+ run : echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" | tee ~/.netrc .netrc
30
+ - name : Prepare | Kubernetes Cluster
17
31
run : |
18
- echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" > ~/.netrc
32
+ echo "Create flux-system namespace"
33
+ kubectl create namespace flux-system
34
+ echo "Adding GitHub promotion credentials"
35
+ kubectl create secret generic -n flux-system github-promotion-credentials \
36
+ --from-literal="username=${{ secrets.PROMOTION_GITHUB_USERNAME }}" \
37
+ --from-literal="password=${{ secrets.PROMOTION_GITHUB_TOKEN }}" \
38
+ --from-literal="token=${{ secrets.PROMOTION_GITHUB_TOKEN }}"
39
+ echo "Adding GitLab promotion credentials"
40
+ kubectl create secret generic -n flux-system gitlab-promotion-credentials \
41
+ --from-literal="username=${{ secrets.PROMOTION_GITLAB_USERNAME }}" \
42
+ --from-literal="password=${{ secrets.PROMOTION_GITLAB_TOKEN }}" \
43
+ --from-literal="token=${{ secrets.PROMOTION_GITLAB_TOKEN }}"
19
44
- name : Run E2E tests
20
45
run : make e2e
Original file line number Diff line number Diff line change @@ -214,10 +214,13 @@ e2e: e2e-setup e2e-test e2e-clean
214
214
.PHONY : e2e-setup
215
215
e2e-setup : e2e-kind deploy
216
216
kubectl wait -n pipeline-system deployment/pipeline-controller --for=condition=available
217
- kubectl apply -f e2e/testdata --recursive
217
+ kubectl apply -k e2e/testdata/pipelines/github
218
+ kubectl apply -k e2e/testdata/pipelines/gitlab
218
219
219
220
e2e-kind : docker-build
221
+ ifneq ($(CI ) , true)
220
222
kind create cluster --name=pipeline-controller || kubectx kind-pipeline-controller
223
+ endif
221
224
kind load docker-image --name=pipeline-controller $(IMG)
222
225
flux install
223
226
@@ -227,4 +230,9 @@ e2e-test:
227
230
228
231
.PHONY : e2e-clean
229
232
e2e-clean :
233
+ kubectl delete -k e2e/testdata/pipelines/github
234
+ kubectl delete -k e2e/testdata/pipelines/gitlab
235
+ flux uninstall --silent
236
+ ifneq ($(CI ) , true)
230
237
kind delete cluster --name=pipeline-controller
238
+ endif
Original file line number Diff line number Diff line change
1
+ apiVersion : kustomize.config.k8s.io/v1beta1
2
+ kind : Kustomization
3
+ resources :
4
+ - podinfo-dev/
5
+ - podinfo-prod/
6
+ - pipeline.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : kustomize.config.k8s.io/v1beta1
2
+ kind : Kustomization
3
+ resources :
4
+ - namespace.yaml
5
+ - source.yaml
6
+ - release.yaml
7
+ - notification.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : kustomize.config.k8s.io/v1beta1
2
+ kind : Kustomization
3
+ resources :
4
+ - namespace.yaml
5
+ - source.yaml
6
+ - release.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : kustomize.config.k8s.io/v1beta1
2
+ kind : Kustomization
3
+ resources :
4
+ - podinfo-dev/
5
+ - podinfo-prod/
6
+ - pipeline.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : kustomize.config.k8s.io/v1beta1
2
+ kind : Kustomization
3
+ resources :
4
+ - namespace.yaml
5
+ - source.yaml
6
+ - release.yaml
7
+ - notification.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : kustomize.config.k8s.io/v1beta1
2
+ kind : Kustomization
3
+ resources :
4
+ - namespace.yaml
5
+ - source.yaml
6
+ - release.yaml
You can’t perform that action at this time.
0 commit comments