Skip to content

Commit

Permalink
feat: open source sriov and env-share features (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
yttan authored Nov 17, 2020
1 parent d631cde commit 8ab8d72
Show file tree
Hide file tree
Showing 614 changed files with 4,448 additions and 350,408 deletions.
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

2 changes: 0 additions & 2 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
_The template below is mostly useful for bug reports and support questions. Feel free to remove anything which doesn't apply to you and add more information where it makes sense._
---

### 1. Issue or feature description

### 2. Steps to reproduce the issue

### 3. Information to [attach](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/) (optional if deemed irrelevant)

64 changes: 37 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,50 @@
name: Cambricon Device Plugin CI
# Copyright 2020 Cambricon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Cambricon Device Plugin CI
on:
pull_request:
branches:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
with:
version: v1.29
working-directory: device-plugin
args: -v

build:
name: Build
runs-on: ubuntu-16.04
runs-on: ubuntu-18.04
steps:

- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: lint
run: test -z `go fmt ./...`

- name: vet
run: go vet ./...

- name: Build
run: go build -v .
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: "1.13.1"
- run: make -C device-plugin build

test:
name: Test device plugin on self-hosted runner
runs-on: [self-hosted]
name: Test
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: Test Device plugin
run: bash ./test/deploy-test-device-plugin.sh
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: "1.13.1"
- run: make -C device-plugin test
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

49 changes: 27 additions & 22 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Copyright 2020 Cambricon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

image: 10.110.210.252:5001/cambricon/buildpack:20200424
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/src/github.com/cambricon/cambricon-k8s-device-plugin
GOPROXY: http://10.110.210.252:8080

.only-mr-refs: &only-mr-refs
refs:
- merge_requests
Expand All @@ -10,27 +26,16 @@ stages:
- build
- test

run-build:
stage: build
image: 10.110.210.252:5001/cambricon/golang:1.11
script:
- export GO111MODULE=off
- export GOPATH=$CI_BUILDS_DIR
- go build .
- go test ./... -v
include:
- local: device-plugin/.gitlab-ci.yml

run-lint:
run-shellcheck-lint:
stage: lint
image: 10.110.210.252:5001/cambricon/golinter:20190221
script:
- export GO111MODULE=off
- export GOPATH=$CI_BUILDS_DIR
- test -z `go fmt ./...`
- go vet ./...

run-test-device-plugin:
stage: test
tags:
- shell47
image: 10.110.210.252:5001/cambricon/shellcheck-alpine:v0.7.0
script:
- bash ./test/deploy-test-device-plugin.sh
- find . -name '*.sh' -exec shellcheck {} +
only:
changes:
- .gitlab-ci.yml
- "**/*.sh"
<<: *only-mr-refs
25 changes: 25 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2020 Cambricon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

linters:
enable:
- govet
- gofmt
- goimports
- golint
disable-all: true
issues:
exclude-use-default: false
exclude:
- (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)
1 change: 0 additions & 1 deletion Dockerfile

This file was deleted.

160 changes: 0 additions & 160 deletions Gopkg.lock

This file was deleted.

37 changes: 0 additions & 37 deletions Gopkg.toml

This file was deleted.

Loading

0 comments on commit 8ab8d72

Please sign in to comment.