Skip to content

Commit 44993b6

Browse files
authored
Merge pull request #33 from kumarabd/kumarabd/feature/smi-grpc-fix
modified smi-conformance build
2 parents a245e6f + d7fa90f commit 44993b6

File tree

8 files changed

+193
-80
lines changed

8 files changed

+193
-80
lines changed

.github/workflows/ci.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,21 @@ jobs:
2525
with:
2626
username: ${{ secrets.DOCKER_USERNAME }}
2727
password: ${{ secrets.DOCKER_PASSWORD }}
28-
- name: Docker build & push
28+
- name: Docker build & push services
2929
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success()
3030
run: |
3131
cd service && docker build --no-cache -t ${{ secrets.IMAGE_NAME }} .
3232
docker tag ${{ secrets.IMAGE_NAME }}:latest ${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::6}
3333
docker push ${{ secrets.IMAGE_NAME }}:latest
3434
docker push ${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::6}
35+
cd ../smi-conformance && docker build --no-cache -t smi-conformance:latest .
36+
docker tag smi-conformance:latest smi-conformance:${GITHUB_SHA::6}
37+
docker push smi-conformance:latest
38+
docker push smi-conformance:${GITHUB_SHA::6}
3539
- name: Docker tag release & push
3640
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
3741
run: |
3842
docker tag ${{ secrets.IMAGE_NAME }}:latest ${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}
3943
docker push ${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}
44+
docker tag smi-conformance:latest smi-conformance:${GITHUB_REF/refs\/tags\//}
45+
docker push smi-conformance:${GITHUB_REF/refs\/tags\//}

deploy/maesh.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ mesh:
9797
# Tracing configuration.
9898
#
9999
tracing:
100-
deploy: true
100+
deploy: false
101101
jaeger:
102102
image:
103103
name: groundnuty/k8s-wait-for:v1.3
104-
enabled: true
104+
enabled: false
105105
localagenthostport: ""
106106
samplingserverurl: ""
107107
# datadog:
@@ -142,10 +142,10 @@ tracing:
142142
# Metrics configuration.
143143
#
144144
metrics:
145-
deploy: true
145+
deploy: false
146146
prometheus:
147147
# whether to expose Prometheus metrics
148-
enabled: true
148+
enabled: false
149149
## you can override values of the metrics subchart here.
150150
## check charts/metrics/values.yaml for the defaults.
151151
## example:

smi-conformance/Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
FROM golang:1.14-alpine3.11 as build-img
22
LABEL maintainer "Layer5.io"
33

4-
ENV GO111MODULE=off
54

65
RUN apk update && apk add --no-cache git libc-dev gcc pkgconf && mkdir /home/meshery
76
COPY ${PWD} /go/src/github.com/layer5io/learn-layer5/smi-conformance/
87
WORKDIR /go/src/github.com/layer5io/learn-layer5/smi-conformance/
98
# RUN git rev-parse HEAD > /home/meshery/version
109
# RUN git describe --tags `git rev-list --tags --max-count=1` >> /home/com/version
11-
1210
RUN go mod vendor && go build -a -ldflags "-s -w" -o /home/meshery/smi_conformance main.go
1311

1412
FROM alpine:latest
1513

16-
RUN apk --no-cache add ca-certificates
14+
RUN apk --no-cache add ca-certificates && mkdir /home/test-yamls && mkdir /home/test-yamls/traffic-access && mkdir /home/test-yamls/traffic-spec && mkdir /home/test-yamls/traffic-split
1715
COPY --from=build-img /home/meshery/** /home/
16+
COPY --from=build-img /go/src/github.com/layer5io/learn-layer5/smi-conformance/test-gen/test-yamls/traffic-access/** /home/test-yamls/traffic-access/
17+
COPY --from=build-img /go/src/github.com/layer5io/learn-layer5/smi-conformance/test-gen/test-yamls/test-split/** /home/test-yamls/traffic-split/
18+
COPY --from=build-img /go/src/github.com/layer5io/learn-layer5/smi-conformance/test-gen/test-yamls/test-spec/** /home/test-yamls/traffic-spec/
1819
WORKDIR /home/
1920
EXPOSE 10008
2021
CMD ["sh","-c","./smi_conformance"]

smi-conformance/conformance/conformance.pb.go

+128-36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

smi-conformance/conformance/conformance.proto

+13-6
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,25 @@ option go_package = "conformance;conformance";
55

66
message Request {
77
map<string, string> annotations=1;
8-
string meshname=2;
8+
string meshname = 2;
99
}
1010

1111
message SingleTestResult {
12-
string name =1;
13-
string testCasesPassed =2;
14-
string totalCases =3;
15-
string message=4;
12+
string name = 1;
13+
string time = 2;
14+
string assertions = 3;
15+
Failure failure = 4;
16+
}
17+
18+
message Failure {
19+
string test = 1;
20+
string message = 2;
1621
}
1722

1823
message Response {
19-
repeated SingleTestResult singleTestResult=1;
24+
string tests = 1;
25+
string failures = 2;
26+
repeated SingleTestResult singleTestResult=3;
2027
}
2128

2229
service conformanceTesting{

smi-conformance/go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require (
1010
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
1111
github.com/kudobuilder/kuttl v0.0.0-00010101000000-000000000000
1212
github.com/kumarabd/gokit v0.2.0
13+
github.com/sirupsen/logrus v1.6.0
1314
github.com/stretchr/testify v1.6.1 // indirect
1415
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 // indirect
1516
google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 // indirect

0 commit comments

Comments
 (0)