Commit b131fb2 1 parent ab80a81 commit b131fb2 Copy full SHA for b131fb2
File tree 4 files changed +41
-15
lines changed
4 files changed +41
-15
lines changed Original file line number Diff line number Diff line change @@ -77,24 +77,18 @@ jobs:
77
77
path : codegen.patch
78
78
destination : .
79
79
test :
80
- working_directory : /home/circleci/.go_workspace /src/github.com/argoproj/argo-cd
81
- machine :
82
- image : circleci/classic:201808-01
80
+ working_directory : /go /src/github.com/argoproj/argo-cd
81
+ docker :
82
+ - image : jannfis/argocd-test-utils:0.0.3
83
83
steps :
84
84
- restore_go_cache
85
- - install_golang
86
85
- checkout
87
86
- restore_cache :
88
87
key : test-dl-v2
89
- - run : sudo ./hack/install.sh kubectl-linux kubectx-linux dep-linux ksonnet-linux helm-linux helm2-linux kustomize-linux
90
- - save_cache :
91
- key : test-dl-v2
92
- paths : [/tmp/dl]
93
88
- configure_git
94
- - run : go get github.com/jstemmer/go-junit-report
95
89
- restore_vendor
96
90
- run : dep ensure -v
97
- - run : make test
91
+ - run : make test-local
98
92
- save_vendor
99
93
- save_go_cache
100
94
- run :
@@ -214,4 +208,4 @@ workflows:
214
208
- ui :
215
209
requires :
216
210
- codegen
217
- - e2e
211
+ - e2e
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ PACKR_CMD=$(shell if [ "`which packr`" ]; then echo "packr"; else echo "go run v
12
12
VOLUME_MOUNT =$(shell if [[ selinuxenabled -eq 0 ]]; then echo ":Z"; elif [[ $(go env GOOS ) =="darwin" ]]; then echo ":delegated"; else echo ""; fi)
13
13
14
14
define run-in-dev-tool
15
- docker run --rm -it -u $(shell id -u) -e HOME=/home/user -v ${CURRENT_DIR}: /go/src/github.com/argoproj/argo-cd ${VOLUME_MOUNT} -w /go/src/github.com/argoproj/argo-cd argocd-dev-tools bash -c "GOPATH=/go $(1 ) "
15
+ docker run --rm -it -u $(shell id -u) -e HOME=/home/user -v ${HOME} /go/src:/go/src ${VOLUME_MOUNT} -w /go/src/github.com/argoproj/argo-cd argocd-dev-tools bash -c "GOPATH=/go $(1 ) "
16
16
endef
17
17
18
18
PATH: =$(PATH ) :$(PWD ) /hack
@@ -175,7 +175,11 @@ build:
175
175
go build -v ` go list ./... | grep -v ' resource_customizations\|test/e2e' `
176
176
177
177
.PHONY : test
178
- test :
178
+ test : dev-tools-image
179
+ $(call run-in-dev-tool,make test-local)
180
+
181
+ .PHONY : test-local
182
+ test-local :
179
183
./hack/test.sh -coverprofile=coverage.out ` go list ./... | grep -v ' test/e2e' `
180
184
181
185
.PHONY : test-e2e
Original file line number Diff line number Diff line change 1
1
FROM golang:1.14.0 as builder
2
2
3
- RUN apt-get update && apt-get install -y zip
3
+ RUN echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ ca-certificates \
7
+ openssh-server \
8
+ nginx \
9
+ fcgiwrap \
10
+ git \
11
+ git-lfs \
12
+ gpg \
13
+ make \
14
+ wget \
15
+ gcc \
16
+ zip && \
17
+ apt-get clean && \
18
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
19
+
4
20
5
21
ADD install.sh .
6
22
ADD installers installers
7
23
24
+ RUN ./install.sh dep-linux
25
+ RUN ./install.sh packr-linux
26
+ RUN ./install.sh kubectl-linux
27
+ RUN ./install.sh ksonnet-linux
28
+ RUN ./install.sh helm2-linux
29
+ RUN ./install.sh helm-linux
30
+ RUN ./install.sh kustomize-linux
31
+
8
32
RUN ./install.sh codegen-tools
9
33
RUN ./install.sh codegen-go-tools
10
34
11
35
RUN mkdir -p /home/user && chmod 777 /home/user
12
36
RUN HELM_HOME=/home/user/.helm helm2 init --client-only
13
37
38
+ RUN git config --system user.name "ArgoCD Test User"
39
+ RUN git config --system user.email "noreply@example.com"
40
+
14
41
RUN mkdir -p /go/pkg && chmod 777 /go/pkg
15
42
16
43
RUN apt-get clean && \
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ set -eux -o pipefail
3
3
4
4
# make sure apiclient does not depend on packr
5
5
which godepgraph || go get github.com/kisielk/godepgraph
6
+ which go-junit-report || go get github.com/jstemmer/go-junit-report
6
7
if godepgraph -s github.com/argoproj/argo-cd/pkg/apiclient | grep packr; then
7
8
echo apiclient package should not depend on packr
8
9
exit 1
@@ -20,4 +21,4 @@ report() {
20
21
21
22
trap ' report' EXIT
22
23
23
- go test -failfast $* 2>&1 | tee $TEST_RESULTS /test.out
24
+ go test -p 8 - failfast $* 2>&1 | tee $TEST_RESULTS /test.out
You can’t perform that action at this time.
0 commit comments