Skip to content

Commit

Permalink
Merge pull request #33 from kumarabd/kumarabd/feature/smi-grpc-fix
Browse files Browse the repository at this point in the history
modified smi-conformance build
  • Loading branch information
leecalcote committed Aug 6, 2020
2 parents a245e6f + d7fa90f commit 44993b6
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 80 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,21 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker build & push
- name: Docker build & push services
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success()
run: |
cd service && docker build --no-cache -t ${{ secrets.IMAGE_NAME }} .
docker tag ${{ secrets.IMAGE_NAME }}:latest ${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::6}
docker push ${{ secrets.IMAGE_NAME }}:latest
docker push ${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::6}
cd ../smi-conformance && docker build --no-cache -t smi-conformance:latest .
docker tag smi-conformance:latest smi-conformance:${GITHUB_SHA::6}
docker push smi-conformance:latest
docker push smi-conformance:${GITHUB_SHA::6}
- name: Docker tag release & push
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
run: |
docker tag ${{ secrets.IMAGE_NAME }}:latest ${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}
docker push ${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}
docker tag smi-conformance:latest smi-conformance:${GITHUB_REF/refs\/tags\//}
docker push smi-conformance:${GITHUB_REF/refs\/tags\//}
8 changes: 4 additions & 4 deletions deploy/maesh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ mesh:
# Tracing configuration.
#
tracing:
deploy: true
deploy: false
jaeger:
image:
name: groundnuty/k8s-wait-for:v1.3
enabled: true
enabled: false
localagenthostport: ""
samplingserverurl: ""
# datadog:
Expand Down Expand Up @@ -142,10 +142,10 @@ tracing:
# Metrics configuration.
#
metrics:
deploy: true
deploy: false
prometheus:
# whether to expose Prometheus metrics
enabled: true
enabled: false
## you can override values of the metrics subchart here.
## check charts/metrics/values.yaml for the defaults.
## example:
Expand Down
7 changes: 4 additions & 3 deletions smi-conformance/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
FROM golang:1.14-alpine3.11 as build-img
LABEL maintainer "Layer5.io"

ENV GO111MODULE=off

RUN apk update && apk add --no-cache git libc-dev gcc pkgconf && mkdir /home/meshery
COPY ${PWD} /go/src/github.com/layer5io/learn-layer5/smi-conformance/
WORKDIR /go/src/github.com/layer5io/learn-layer5/smi-conformance/
# RUN git rev-parse HEAD > /home/meshery/version
# RUN git describe --tags `git rev-list --tags --max-count=1` >> /home/com/version

RUN go mod vendor && go build -a -ldflags "-s -w" -o /home/meshery/smi_conformance main.go

FROM alpine:latest

RUN apk --no-cache add ca-certificates
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
COPY --from=build-img /home/meshery/** /home/
COPY --from=build-img /go/src/github.com/layer5io/learn-layer5/smi-conformance/test-gen/test-yamls/traffic-access/** /home/test-yamls/traffic-access/
COPY --from=build-img /go/src/github.com/layer5io/learn-layer5/smi-conformance/test-gen/test-yamls/test-split/** /home/test-yamls/traffic-split/
COPY --from=build-img /go/src/github.com/layer5io/learn-layer5/smi-conformance/test-gen/test-yamls/test-spec/** /home/test-yamls/traffic-spec/
WORKDIR /home/
EXPOSE 10008
CMD ["sh","-c","./smi_conformance"]
164 changes: 128 additions & 36 deletions smi-conformance/conformance/conformance.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions smi-conformance/conformance/conformance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,25 @@ option go_package = "conformance;conformance";

message Request {
map<string, string> annotations=1;
string meshname=2;
string meshname = 2;
}

message SingleTestResult {
string name =1;
string testCasesPassed =2;
string totalCases =3;
string message=4;
string name = 1;
string time = 2;
string assertions = 3;
Failure failure = 4;
}

message Failure {
string test = 1;
string message = 2;
}

message Response {
repeated SingleTestResult singleTestResult=1;
string tests = 1;
string failures = 2;
repeated SingleTestResult singleTestResult=3;
}

service conformanceTesting{
Expand Down
1 change: 1 addition & 0 deletions smi-conformance/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
github.com/kudobuilder/kuttl v0.0.0-00010101000000-000000000000
github.com/kumarabd/gokit v0.2.0
github.com/sirupsen/logrus v1.6.0
github.com/stretchr/testify v1.6.1 // indirect
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 // indirect
google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 // indirect
Expand Down
Loading

0 comments on commit 44993b6

Please sign in to comment.