Skip to content

Commit 6b82f25

Browse files
authored
Merge pull request #147 from layer5io/kumarabd/feature/labs
fixed ci
2 parents 33dac29 + ede4098 commit 6b82f25

File tree

3 files changed

+71
-50
lines changed

3 files changed

+71
-50
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Meshery-istio Build and Releaser
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
tags:
7+
- 'v*'
8+
9+
jobs:
10+
build:
11+
name: Build check
12+
runs-on: ubuntu-latest
13+
# needs: [lint, error_check, static_check, vet, sec_check, tests]
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@master
17+
with:
18+
fetch-depth: 1
19+
- name: Setup Go
20+
uses: actions/setup-go@v1
21+
with:
22+
go-version: ${{ secrets.GO_VERSION }}
23+
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .
24+
docker:
25+
name: Docker build and push
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Check out code
29+
uses: actions/checkout@master
30+
with:
31+
fetch-depth: 1
32+
- name: Docker login
33+
uses: azure/docker-login@v1
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
- name: Docker edge build & tag
38+
if: startsWith(github.ref, 'refs/tags/') != true && success()
39+
run: |
40+
DOCKER_BUILDKIT=1 docker build --no-cache -t ${{ secrets.IMAGE_NAME }}:edge-latest --build-arg TOKEN=${{ secrets.GLOBAL_TOKEN }} .
41+
docker tag ${{ secrets.IMAGE_NAME }}:edge-latest ${{ secrets.IMAGE_NAME }}:edge-${GITHUB_SHA::7}
42+
- name: Docker edge push
43+
if: startsWith(github.ref, 'refs/tags/') != true && success()
44+
run: |
45+
docker push ${{ secrets.IMAGE_NAME }}:edge-latest
46+
docker push ${{ secrets.IMAGE_NAME }}:edge-${GITHUB_SHA::7}
47+
- name: Docker stable build & tag
48+
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
49+
run: |
50+
DOCKER_BUILDKIT=1 docker build --no-cache -t ${{ secrets.IMAGE_NAME }}:stable-latest .
51+
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
52+
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
53+
- name: Docker stable push
54+
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
55+
run: |
56+
docker push ${{ secrets.IMAGE_NAME }}:stable-latest
57+
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
58+
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
59+
- name: Docker Hub Description
60+
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
61+
uses: peter-evans/[email protected]
62+
env:
63+
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
64+
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
65+
DOCKERHUB_REPOSITORY: ${{ secrets.IMAGE_NAME }}

.github/workflows/ci.yml

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -97,53 +97,4 @@ jobs:
9797
echo "current-context:" ${CURRENTCONTEXT}
9898
export KUBECONFIG="${HOME}/.kube/config"
9999
echo "environment-kubeconfig:" ${KUBECONFIG}
100-
GOPROXY=direct GOSUMDB=off GO111MODULE=on go test ./...
101-
build:
102-
name: Build check
103-
runs-on: ubuntu-latest
104-
# needs: [lint, error_check, static_check, vet, sec_check, tests]
105-
steps:
106-
- name: Check out code
107-
uses: actions/checkout@master
108-
with:
109-
fetch-depth: 1
110-
- name: Setup Go
111-
uses: actions/setup-go@v1
112-
with:
113-
go-version: ${{ secrets.GO_VERSION }}
114-
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .
115-
docker:
116-
name: Docker build and push
117-
runs-on: ubuntu-latest
118-
# needs: [build, build_release]
119-
steps:
120-
- name: Check out code
121-
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
122-
uses: actions/checkout@master
123-
with:
124-
fetch-depth: 1
125-
- name: Docker login
126-
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
127-
uses: azure/container-actions/docker-login@master
128-
with:
129-
username: ${{ secrets.DOCKER_USERNAME }}
130-
password: ${{ secrets.DOCKER_PASSWORD }}
131-
- name: Docker build & tag
132-
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
133-
run: |
134-
DOCKER_BUILDKIT=1 docker build --no-cache -t ${{ secrets.IMAGE_NAME }}:stable-latest .
135-
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
136-
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
137-
- name: Docker push
138-
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
139-
run: |
140-
docker push ${{ secrets.IMAGE_NAME }}:stable-latest
141-
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
142-
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
143-
- name: Docker Hub Description
144-
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
145-
uses: peter-evans/[email protected]
146-
env:
147-
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
148-
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
149-
DOCKERHUB_REPOSITORY: ${{ secrets.IMAGE_NAME }}
100+
GOPROXY=direct GOSUMDB=off GO111MODULE=on go test ./...

istio/istio.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,11 @@ func (iClient *Client) ApplyOperation(ctx context.Context, arReq *meshes.ApplyRu
627627
return &meshes.ApplyRuleResponse{
628628
OperationId: arReq.OperationId,
629629
}, nil
630+
case runVet:
631+
err = iClient.runVet()
632+
return &meshes.ApplyRuleResponse{
633+
OperationId: arReq.OperationId,
634+
}, err
630635
case installImagehub:
631636
go func() {
632637
opName1 := "deploying"

0 commit comments

Comments
 (0)