This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
forked from coreos/etcd-operator
-
Notifications
You must be signed in to change notification settings - Fork 18
117 lines (108 loc) · 3.88 KB
/
go-test-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Testing E2E
on:
push:
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15
uses: actions/[email protected]
with:
go-version: 1.15
id: go
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Docker login
run: docker login docker.pkg.github.com -u marlinc -p "${GITHUB_PACKAGE_REGISTRY_TOKEN}"
env:
GITHUB_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GITHUB_PACKAGE_REGISTRY_TOKEN }}
- name: Prepare e2e image
run: |
hack/build/e2e/docker_push
env:
TEST_IMAGE: docker.pkg.github.com/cbws/etcd-operator/etcd-operator-e2e:${{github.sha}}
- name: Prepare operator image
run: |
hack/build/operator/build
hack/build/backup-operator/build
hack/build/restore-operator/build
IMAGE=${OPERATOR_IMAGE} hack/build/docker_push
env:
OPERATOR_IMAGE: docker.pkg.github.com/cbws/etcd-operator/operator:${{github.sha}}
test-e2e:
name: E2E
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Set up Go 1.13
uses: actions/[email protected]
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: KinD (Kubernetes in Docker) Action
uses: engineerd/[email protected]
- name: Test
run: |
docker login docker.pkg.github.com -u marlinc -p "${GITHUB_PACKAGE_REGISTRY_TOKEN}"
docker pull $TEST_IMAGE
docker pull $OPERATOR_IMAGE
export KUBECONFIG="${HOME}/.kube/config"
kind load docker-image $TEST_IMAGE
kind load docker-image $OPERATOR_IMAGE
hack/ci/run_e2e
env:
GITHUB_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GITHUB_PACKAGE_REGISTRY_TOKEN }}
OPERATOR_IMAGE: docker.pkg.github.com/cbws/etcd-operator/operator:${{github.sha}}
TEST_AWS_SECRET: na
TEST_S3_BUCKET: na
TEST_NAMESPACE: default
BUILD_IMAGE: false
BUILD_E2E: false
TEST_IMAGE: docker.pkg.github.com/cbws/etcd-operator/etcd-operator-e2e:${{github.sha}}
PASSES: e2e
- name: Show logs
if: ${{ always() }}
run: |
ls -laR
cat _output/logs/*
# test-e2eslow:
# name: E2E slow
# runs-on: ubuntu-latest
# needs: prepare
# steps:
# - name: Set up Go 1.13
# uses: actions/[email protected]
# with:
# go-version: 1.13
# id: go
#
# - name: Check out code into the Go module directory
# uses: actions/[email protected]
#
# - name: KinD (Kubernetes in Docker) Action
# uses: engineerd/[email protected]
#
# - name: Test
# run: |
# docker login docker.pkg.github.com -u marlinc -p "${GITHUB_PACKAGE_REGISTRY_TOKEN}"
# docker pull $TEST_IMAGE
# docker pull $OPERATOR_IMAGE
# export KUBECONFIG="$(kind get kubeconfig-path)"
# kind load docker-image $TEST_IMAGE
# kind load docker-image $OPERATOR_IMAGE
# kubectl create secret docker-registry --docker-server=docker.pkg.github.com --docker-username=marlinc --docker-password=${GITHUB_PACKAGE_REGISTRY_TOKEN} github
# kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "github"}]}'
# hack/ci/run_e2e
# env:
# GITHUB_PACKAGE_REGISTRY_TOKEN: ${{ secrets.GITHUB_PACKAGE_REGISTRY_TOKEN }}
# OPERATOR_IMAGE: docker.pkg.github.com/cbws/etcd-operator/operator:${{github.sha}}
# TEST_AWS_SECRET: na
# TEST_S3_BUCKET: na
# TEST_NAMESPACE: default
# BUILD_IMAGE: false
# BUILD_E2E: false
# TEST_IMAGE: docker.pkg.github.com/cbws/etcd-operator/etcd-operator-e2e:${{github.sha}}
# PASSES: e2eslow