1414 docker_layer_caching : true
1515
1616 environment :
17- GO_VERSION : ' 1.11.4 '
17+ GO_VERSION : ' 1.13 '
1818 K8S_VERSION : ' v1.12.0'
1919 VAULT_VERSION : ' 1.0.0'
2020 KUBECONFIG : ' /home/circleci/.kube/config'
2929
3030 steps :
3131 - checkout
32-
3332 - run :
3433 name : Setup golang
3534 command : |
@@ -39,100 +38,103 @@ jobs:
3938 "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" \
4039 && sudo tar -C /usr/local -xzf go.linux-amd64.tar.gz
4140 echo 'export PATH="$GOPATH/bin:$PATH"' >> "${BASH_ENV}"
42-
4341 - run :
4442 name : Run fmt
4543 command : |
4644 make check-fmt
47-
4845 - run :
4946 name : Run golint
5047 command : |
5148 make lint
52-
5349 - run :
5450 name : Run misspell
5551 command : |
56- make check-misspell
57-
52+ make check-misspell
5853 - run :
5954 name : Run ineffassign
6055 command : |
61- make ineffassign
62-
63- - run :
64- name : Setup kubectl
65- command : |
66- curl \
67- -Lo kubectl \
68- "https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl" \
69- && chmod +x kubectl \
70- && sudo mv kubectl /usr/local/bin/
71- mkdir -p "${HOME}/.kube"
72- touch "${HOME}/.kube/config"
73-
74- - run :
75- name : Setup minikube
76- command : |
77- curl \
78- -Lo minikube \
79- "https://github.com/kubernetes/minikube/releases/download/${MINIKUBE_VERSION}/minikube-linux-amd64" \
80- && chmod +x minikube \
81- && sudo mv minikube /usr/local/bin/
82-
83- - run :
84- name : Start minikube
85- command : |
86- sudo -E minikube start --vm-driver=none --cpus 2 --memory 4096 --kubernetes-version="${K8S_VERSION}"
87-
56+ make ineffassign
8857 - run :
89- name : Install Helm
58+ name : Check generators for unwanted diffs
9059 command : |
91- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
92- chmod 700 get_helm.sh
93- ./get_helm.sh
94-
95- helm init
96- helm repo add banzaicloud-stable http://kubernetes-charts.banzaicloud.com/branch/master
97- helm repo update
98-
99- - run :
100- name : Start Minio
101- command : |
102- kubectl create -f hack/minio.yaml
103- kubectl wait --for=condition=available deployment/minio-deployment --timeout=120s
104- minio="$(kubectl get pod -l app=minio -o 'jsonpath={.items[0].metadata.name}')"
105- kubectl wait --for=condition=Ready pod "${minio}" --timeout=120s
106-
107- - run :
108- name : Setup minio cli
109- command : |
110- kubectl create -f hack/minio-mc.yaml
111- kubectl wait --for=condition=available deployment/minio-mc-deployment --timeout=120s
112- mc_pod="$(kubectl get pod -l app=minio-mc -o 'jsonpath={.items[0].metadata.name}')"
113- kubectl wait --for=condition=Ready pod "${mc_pod}" --timeout=120s
114- kubectl exec "${mc_pod}" -- \
115- mc config host add minio \
116- 'http://minio-service.default.svc.cluster.local:9000' \
117- 'minio_access_key' \
118- 'minio_secret_key'
119-
120- - run :
121- name : Create test bucket
122- command : |
123- mc_pod="$(kubectl get pod -l app=minio-mc -o 'jsonpath={.items[0].metadata.name}')"
124- kubectl exec "${mc_pod}" -- \
125- mc mb --region 'test_region' minio/logs
126-
127- - run :
128- name : Build docker image
129- command : |
130- make docker DOCKER_TAG=local
131-
60+ make check-diff
13261 - run :
13362 name : Test
13463 command : |
135- hack/test.sh
64+ make test
65+ # - run:
66+ # name: Setup kubectl
67+ # command: |
68+ # curl \
69+ # -Lo kubectl \
70+ # "https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl" \
71+ # && chmod +x kubectl \
72+ # && sudo mv kubectl /usr/local/bin/
73+ # mkdir -p "${HOME}/.kube"
74+ # touch "${HOME}/.kube/config"
75+ #
76+ # - run:
77+ # name: Setup minikube
78+ # command: |
79+ # curl \
80+ # -Lo minikube \
81+ # "https://github.com/kubernetes/minikube/releases/download/${MINIKUBE_VERSION}/minikube-linux-amd64" \
82+ # && chmod +x minikube \
83+ # && sudo mv minikube /usr/local/bin/
84+ #
85+ # - run:
86+ # name: Start minikube
87+ # command: |
88+ # sudo -E minikube start --vm-driver=none --cpus 2 --memory 4096 --kubernetes-version="${K8S_VERSION}"
89+ #
90+ # - run:
91+ # name: Install Helm
92+ # command: |
93+ # curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh
94+ # chmod 700 get_helm.sh
95+ # ./get_helm.sh
96+ #
97+ # helm init
98+ # helm repo add banzaicloud-stable http://kubernetes-charts.banzaicloud.com/branch/master
99+ # helm repo update
100+ #
101+ # - run:
102+ # name: Start Minio
103+ # command: |
104+ # kubectl create -f hack/minio.yaml
105+ # kubectl wait --for=condition=available deployment/minio-deployment --timeout=120s
106+ # minio="$(kubectl get pod -l app=minio -o 'jsonpath={.items[0].metadata.name}')"
107+ # kubectl wait --for=condition=Ready pod "${minio}" --timeout=120s
108+ #
109+ # - run:
110+ # name: Setup minio cli
111+ # command: |
112+ # kubectl create -f hack/minio-mc.yaml
113+ # kubectl wait --for=condition=available deployment/minio-mc-deployment --timeout=120s
114+ # mc_pod="$(kubectl get pod -l app=minio-mc -o 'jsonpath={.items[0].metadata.name}')"
115+ # kubectl wait --for=condition=Ready pod "${mc_pod}" --timeout=120s
116+ # kubectl exec "${mc_pod}" -- \
117+ # mc config host add minio \
118+ # 'http://minio-service.default.svc.cluster.local:9000' \
119+ # 'minio_access_key' \
120+ # 'minio_secret_key'
121+ #
122+ # - run:
123+ # name: Create test bucket
124+ # command: |
125+ # mc_pod="$(kubectl get pod -l app=minio-mc -o 'jsonpath={.items[0].metadata.name}')"
126+ # kubectl exec "${mc_pod}" -- \
127+ # mc mb --region 'test_region' minio/logs
128+ #
129+ # - run:
130+ # name: Build docker image
131+ # command: |
132+ # make docker DOCKER_TAG=local
133+ #
134+ # - run:
135+ # name: Test
136+ # command: |
137+ # hack/test.sh
136138
137139workflows :
138140 version : 2
@@ -143,8 +145,8 @@ workflows:
143145 jobs :
144146 - helm/lint-chart :
145147 filters :
146- tags :
147- ignore : /.*/
148+ tags :
149+ ignore : /.*/
148150
149151 - helm/publish-chart :
150152 context : helm
@@ -153,4 +155,3 @@ workflows:
153155 ignore : /.*/
154156 tags :
155157 only : /chart\/.*\/\d+.\d+.\d+.*/
156-
0 commit comments