Skip to content

Commit

Permalink
Merge pull request #147 from layer5io/kumarabd/feature/labs
Browse files Browse the repository at this point in the history
fixed ci
  • Loading branch information
kumarabd authored Nov 3, 2020
2 parents 33dac29 + ede4098 commit 6b82f25
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 50 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Meshery-istio Build and Releaser
on:
push:
branches:
- 'master'
tags:
- 'v*'

jobs:
build:
name: Build check
runs-on: ubuntu-latest
# needs: [lint, error_check, static_check, vet, sec_check, tests]
steps:
- name: Check out code
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: ${{ secrets.GO_VERSION }}
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .
docker:
name: Docker build and push
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Docker login
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker edge build & tag
if: startsWith(github.ref, 'refs/tags/') != true && success()
run: |
DOCKER_BUILDKIT=1 docker build --no-cache -t ${{ secrets.IMAGE_NAME }}:edge-latest --build-arg TOKEN=${{ secrets.GLOBAL_TOKEN }} .
docker tag ${{ secrets.IMAGE_NAME }}:edge-latest ${{ secrets.IMAGE_NAME }}:edge-${GITHUB_SHA::7}
- name: Docker edge push
if: startsWith(github.ref, 'refs/tags/') != true && success()
run: |
docker push ${{ secrets.IMAGE_NAME }}:edge-latest
docker push ${{ secrets.IMAGE_NAME }}:edge-${GITHUB_SHA::7}
- name: Docker stable build & tag
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
run: |
DOCKER_BUILDKIT=1 docker build --no-cache -t ${{ secrets.IMAGE_NAME }}:stable-latest .
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
- name: Docker stable push
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
run: |
docker push ${{ secrets.IMAGE_NAME }}:stable-latest
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
- name: Docker Hub Description
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
uses: peter-evans/[email protected]
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKERHUB_REPOSITORY: ${{ secrets.IMAGE_NAME }}
51 changes: 1 addition & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,53 +97,4 @@ jobs:
echo "current-context:" ${CURRENTCONTEXT}
export KUBECONFIG="${HOME}/.kube/config"
echo "environment-kubeconfig:" ${KUBECONFIG}
GOPROXY=direct GOSUMDB=off GO111MODULE=on go test ./...
build:
name: Build check
runs-on: ubuntu-latest
# needs: [lint, error_check, static_check, vet, sec_check, tests]
steps:
- name: Check out code
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: ${{ secrets.GO_VERSION }}
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .
docker:
name: Docker build and push
runs-on: ubuntu-latest
# needs: [build, build_release]
steps:
- name: Check out code
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Docker login
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
uses: azure/container-actions/docker-login@master
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker build & tag
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
run: |
DOCKER_BUILDKIT=1 docker build --no-cache -t ${{ secrets.IMAGE_NAME }}:stable-latest .
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
- name: Docker push
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
run: |
docker push ${{ secrets.IMAGE_NAME }}:stable-latest
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
- name: Docker Hub Description
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
uses: peter-evans/[email protected]
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKERHUB_REPOSITORY: ${{ secrets.IMAGE_NAME }}
GOPROXY=direct GOSUMDB=off GO111MODULE=on go test ./...
5 changes: 5 additions & 0 deletions istio/istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@ func (iClient *Client) ApplyOperation(ctx context.Context, arReq *meshes.ApplyRu
return &meshes.ApplyRuleResponse{
OperationId: arReq.OperationId,
}, nil
case runVet:
err = iClient.runVet()
return &meshes.ApplyRuleResponse{
OperationId: arReq.OperationId,
}, err
case installImagehub:
go func() {
opName1 := "deploying"
Expand Down

0 comments on commit 6b82f25

Please sign in to comment.