This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
generated from meshery/meshery-adapter-template
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from layer5io/kumarabd/featuer/smi
moved smi to adapter
- Loading branch information
Showing
6 changed files
with
454 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,149 +1,151 @@ | ||
name: Meshery OSM | ||
name: Meshery-OSM | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- "*" | ||
tags: | ||
- 'v*' | ||
- "v*" | ||
pull_request: | ||
branches: | ||
- 'master' | ||
|
||
- master | ||
jobs: | ||
golangci: | ||
name: golangci-lint | ||
lint: | ||
name: Check & Review code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v1 | ||
- name: Check out code | ||
uses: actions/checkout@master | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.29 | ||
|
||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
|
||
# Optional: golangci-lint command line arguments. | ||
# args: --issues-exit-code=0 | ||
|
||
# Optional: show only new issues if it's a pull request. The default value is `false`. | ||
# only-new-issues: true | ||
server-tests: | ||
needs: [tests-ui, golangci, build-backend, build-ui] | ||
name: Server tests | ||
fetch-depth: 1 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ secrets.GO_VERSION }} | ||
- run: GOPROXY=direct GOSUMDB=off go get -u golang.org/x/lint/golint; go list ./istio/... | grep -v /vendor/ | xargs -L1 /home/runner/go/bin/golint -set_exit_status | ||
error_check: | ||
name: Error check | ||
runs-on: ubuntu-latest | ||
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 }} | ||
- name: Setup Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go test -tags draft ./... | ||
build-backend: | ||
name: Backend build | ||
- 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 get -u github.com/kisielk/errcheck; /home/runner/go/bin/errcheck -tags draft ./... | ||
static_check: | ||
name: Static check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@master | ||
with: | ||
- 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 get -u honnef.co/go/tools/cmd/staticcheck; /home/runner/go/bin/staticcheck -tags draft -checks all ./istio/... # https://staticcheck.io/docs/checks | ||
vet: | ||
name: Vet | ||
runs-on: ubuntu-latest | ||
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 vet -tags draft ./... | ||
sec_check: | ||
name: Security check | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Run Gosec Security Scanner | ||
uses: securego/gosec@master | ||
with: | ||
args: ./... -exclude=G301,G304,G107,G101,G110 | ||
tests: | ||
# needs: [lint, error_check, static_check, vet, sec_check] | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ secrets.GO_VERSION }} | ||
- name: Setup Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build -tags draft ./cmd/main.go | ||
build-ui: | ||
name: UI build | ||
- name: Create cluster using KinD | ||
uses: engineerd/[email protected] | ||
with: | ||
version: "v0.7.0" | ||
- run: | | ||
export CURRENTCONTEXT="$(kubectl config current-context)" | ||
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 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ secrets.NODE_VERSION }} | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- run: | | ||
cd ui | ||
npm i | ||
npm run build && npm run export | ||
cd .. | ||
cd provider-ui | ||
npm i | ||
npm run build && npm run export | ||
tests-ui: | ||
name: UI tests | ||
- 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 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ secrets.NODE_VERSION }} | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- run: | | ||
cd ui | ||
npm i | ||
npm test | ||
cd .. | ||
cd provider-ui | ||
npm i | ||
npm test | ||
cd .. | ||
mesheryctl_build: | ||
name: Mesheryctl build & release | ||
runs-on: macos-latest | ||
needs: [server-tests] | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@master | ||
- name: Unshallow | ||
run: git fetch --prune --unshallow | ||
- name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ secrets.GO_VERSION }} | ||
- name: Setup Cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: goreleaser WITHOUT tag | ||
uses: goreleaser/goreleaser-action@v1 | ||
if: success() && startsWith(github.ref, 'refs/tags/') == false | ||
- name: Docker login | ||
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success() | ||
uses: azure/container-actions/docker-login@master | ||
with: | ||
version: latest | ||
args: release --snapshot --skip-publish --rm-dist | ||
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 }}:${GITHUB_REF/refs\/tags\//}-edge | ||
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 }}:${GITHUB_REF/refs\/tags\//}-edge | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
module github.com/layer5io/meshery-osm | ||
|
||
go 1.3 | ||
go 1.13 | ||
|
||
replace github.com/kudobuilder/kuttl => github.com/layer5io/kuttl v0.4.1-0.20200806180306-b7e46afd657f | ||
replace ( | ||
github.com/kudobuilder/kuttl => github.com/layer5io/kuttl v0.4.1-0.20200806180306-b7e46afd657f | ||
vbom.ml/util => github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787 | ||
) | ||
|
||
require ( | ||
github.com/Azure/go-autorest/autorest/adal v0.9.0 // indirect | ||
github.com/golang/protobuf v1.4.2 | ||
github.com/gophercloud/gophercloud v0.4.0 // indirect | ||
github.com/layer5io/gokit v0.1.5 | ||
github.com/layer5io/gokit v0.1.12 | ||
github.com/layer5io/learn-layer5/smi-conformance v0.0.0-20200916172547-79cf11334bd7 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/sirupsen/logrus v1.6.0 | ||
golang.org/x/net v0.0.0-20200707034311-ab3426394381 | ||
google.golang.org/grpc v1.31.0 | ||
gopkg.in/yaml.v2 v2.3.0 | ||
helm.sh/helm/v3 v3.3.4 | ||
k8s.io/api v0.18.8 | ||
k8s.io/apimachinery v0.18.8 | ||
k8s.io/client-go v0.18.8 | ||
rsc.io/letsencrypt v0.0.3 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.