@@ -3,97 +3,88 @@ name: CI
3
3
on :
4
4
pull_request :
5
5
branches :
6
- - ' * '
6
+ - " * "
7
7
push :
8
8
branches :
9
9
- master
10
10
11
11
jobs :
12
-
13
12
build :
14
13
name : Build
15
14
runs-on : ubuntu-latest
16
15
steps :
16
+ - name : Set up Go 1.14
17
+ uses : actions/setup-go@v1
18
+ with :
19
+ go-version : 1.14
20
+ id : go
17
21
18
- - name : Set up Go 1.14
19
- uses : actions/setup-go@v1
20
- with :
21
- go-version : 1.14
22
- id : go
23
-
24
- - name : Check out code into the Go module directory
25
- uses : actions/checkout@v1
22
+ - uses : actions/checkout@v1
26
23
27
- - name : Set up Docker Buildx
28
- id : buildx
29
- uses : crazy-max/ghaction-docker-buildx@v1
30
- with :
31
- buildx-version : latest
32
- qemu-version : latest
24
+ - name : Set up Docker Buildx
25
+ id : buildx
26
+ uses : crazy-max/ghaction-docker-buildx@v1
27
+ with :
28
+ buildx-version : latest
29
+ qemu-version : latest
33
30
34
- - name : Available platforms
35
- run : echo ${{ steps.buildx.outputs.platforms }}
31
+ - name : Available platforms
32
+ run : echo ${{ steps.buildx.outputs.platforms }}
36
33
37
- - name : Prepare Host
38
- run : |
39
- sudo apt-get -qq update || true
40
- sudo apt-get install -y bzr
41
- # install yq
42
- curl -fsSL -o yq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64
43
- chmod +x yq
44
- sudo mv yq /usr/local/bin/yq
45
- # install kubectl
46
- curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl
47
- chmod +x ./kubectl
48
- sudo mv ./kubectl /usr/local/bin/kubectl
34
+ - name : Prepare Host
35
+ run : |
36
+ sudo apt-get -qq update || true
37
+ sudo apt-get install -y bzr
38
+ # install yq
39
+ curl -fsSL -o yq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64
40
+ chmod +x yq
41
+ sudo mv yq /usr/local/bin/yq
42
+ # install kubectl
43
+ curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/linux/amd64/kubectl
44
+ chmod +x ./kubectl
45
+ sudo mv ./kubectl /usr/local/bin/kubectl
49
46
50
- - name : Run checks
51
- run : |
52
- make ci
47
+ - name : Run checks
48
+ run : |
49
+ make ci
53
50
54
- - name : Build
55
- env :
56
- REGISTRY : appscodeci
57
- DOCKER_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
58
- USERNAME : 1gtm
59
- run : |
60
- docker login --username ${USERNAME} --password ${DOCKER_TOKEN}
61
- make push
51
+ - name : Build
52
+ env :
53
+ REGISTRY : appscodeci
54
+ DOCKER_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
55
+ USERNAME : 1gtm
56
+ run : |
57
+ docker login --username ${USERNAME} --password ${DOCKER_TOKEN}
58
+ make push
62
59
63
- - name : Create Kubernetes cluster
64
- id : kind
65
- uses : engineerd/setup-kind@v0.1 .0
66
- with :
67
- version : v0.7.0
68
- config : hack/kubernetes/kind.yaml
60
+ - name : Create Kubernetes cluster
61
+ id : kind
62
+ uses : engineerd/setup-kind@v0.3 .0
63
+ with :
64
+ version : v0.8.1
65
+ config : hack/kubernetes/kind.yaml
69
66
70
- - name : Prepare cluster for testing
71
- id : local-path
72
- env :
73
- DOCKER_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
74
- USERNAME : 1gtm
75
- REGISTRY_SECRET : regcred
76
- run : |
77
- echo "waiting for nodes to be ready ..."
78
- kubectl wait --for=condition=Ready nodes --all --timeout=5m
79
- kubectl get nodes
80
- echo
81
- echo "installing local-path provisioner ..."
82
- kubectl delete storageclass --all
83
- kubectl apply -f https://github.com/rancher/local-path-provisioner/raw/v0.0.12/deploy/local-path-storage.yaml
84
- kubectl wait --for=condition=Ready pods -n local-path-storage --all --timeout=5m
85
- kubectl apply -f hack/kubernetes/storageclass/standard.yaml
86
- echo
87
- echo "create docker-registry secret"
88
- kubectl create secret docker-registry ${REGISTRY_SECRET} --namespace=kube-system --docker-server=https://index.docker.io/v1/ --docker-username=${USERNAME} --docker-password=${DOCKER_TOKEN}
67
+ - name : Prepare cluster for testing
68
+ id : local-path
69
+ env :
70
+ DOCKER_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
71
+ USERNAME : 1gtm
72
+ REGISTRY_SECRET : regcred
73
+ run : |
74
+ echo "waiting for nodes to be ready ..."
75
+ kubectl wait --for=condition=Ready nodes --all --timeout=5m
76
+ kubectl get nodes
77
+ echo
78
+ echo "create docker-registry secret"
79
+ kubectl create secret docker-registry ${REGISTRY_SECRET} --namespace=kube-system --docker-server=https://index.docker.io/v1/ --docker-username=${USERNAME} --docker-password=${DOCKER_TOKEN}
89
80
90
- - name : Install CRDs
91
- run : |
92
- kubectl apply -f https://github.com/stashed/apimachinery/raw/master/api /crds/stash.appscode.com_functions.yaml
93
- kubectl apply -f https://github.com/stashed/apimachinery/raw/master/api /crds/stash.appscode.com_tasks.yaml
94
- kubectl wait --for=condition=NamesAccepted crds --all --timeout=5m
81
+ - name : Install CRDs
82
+ run : |
83
+ kubectl apply -f https://github.com/stashed/apimachinery/raw/master/crds/stash.appscode.com_functions.yaml
84
+ kubectl apply -f https://github.com/stashed/apimachinery/raw/master/crds/stash.appscode.com_tasks.yaml
85
+ kubectl wait --for=condition=NamesAccepted crds --all --timeout=5m
95
86
96
- - name : Test charts
97
- run : |
98
- export KUBECONFIG=$HOME/.kube/config
99
- make ct
87
+ - name : Test charts
88
+ run : |
89
+ export KUBECONFIG=$HOME/.kube/config
90
+ make ct
0 commit comments