Skip to content

Commit

Permalink
Merge branch 'main' into cleanup/diaer
Browse files Browse the repository at this point in the history
  • Loading branch information
elezar committed Jul 11, 2024
2 parents 7ccbd10 + d00bf2b commit 5ffe947
Show file tree
Hide file tree
Showing 1,894 changed files with 177,687 additions and 77,496 deletions.
33 changes: 13 additions & 20 deletions .common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,16 @@ default:

variables:
GIT_SUBMODULE_STRATEGY: recursive
BUILDIMAGE: "${CI_REGISTRY_IMAGE}/build:${CI_COMMIT_SHORT_SHA}"
BUILD_MULTI_ARCH_IMAGES: "true"

stages:
- trigger
- image
- lint
- go-checks
- go-build
- unit-tests
- package-build
- image-build
- test
- scan
- release
- sign

.pipeline-trigger-rules:
rules:
Expand Down Expand Up @@ -77,12 +72,10 @@ trigger-pipeline:
.dist-ubi8:
variables:
DIST: "ubi8"
CVE_UPDATES: "cyrus-sasl-lib"

.dist-ubuntu20.04:
.dist-ubuntu22.04:
variables:
DIST: "ubuntu20.04"
CVE_UPDATES: "libsasl2-2 libsasl2-modules-db"
DIST: "ubuntu22.04"

# Define the platform targets
.platform-amd64:
Expand Down Expand Up @@ -130,22 +123,22 @@ trigger-pipeline:
- .scan-base

# Define the scan targets
scan-ubuntu20.04-amd64:
scan-ubuntu22.04-amd64:
extends:
- .scan
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .platform-amd64
needs:
- image-ubuntu20.04
- image-ubuntu22.04

scan-ubuntu20.04-arm64:
scan-ubuntu22.04-arm64:
extends:
- .scan
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .platform-arm64
needs:
- image-ubuntu20.04
- scan-ubuntu20.04-amd64
- image-ubuntu22.04
- scan-ubuntu22.04-amd64

scan-ubi8-amd64:
extends:
Expand Down Expand Up @@ -238,9 +231,9 @@ release:staging-ubi8:
needs:
- image-ubi8

release:staging-ubuntu20.04:
release:staging-ubuntu22.04:
extends:
- .release:staging
- .dist-ubuntu20.04
- .dist-ubuntu22.04
needs:
- image-ubuntu20.04
- image-ubuntu22.04
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
Dockerfile
.git
/nvidia-device-plugin
/releases
68 changes: 68 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod"
target-branch: main
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
labels:
- dependencies
groups:
k8sio:
patterns:
- k8s.io/*
exclude-patterns:
- k8s.io/klog/*

- package-ecosystem: "docker"
directory: "/deployments/container"
schedule:
interval: "daily"

- package-ecosystem: "gomod"
target-branch: release-0.15
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
labels:
- dependencies
- maintenance
groups:
k8sio:
patterns:
- k8s.io/*
exclude-patterns:
- k8s.io/klog/*

- package-ecosystem: "docker"
target-branch: release-0.15
directory: "/deployments/container"
schedule:
interval: "daily"
labels:
- dependencies
- maintenance

- package-ecosystem: "gomod"
target-branch: main
directory: "deployments/devel"
schedule:
interval: "weekly"
day: "sunday"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
target-branch: gh-pages
directory: "/"
schedule:
interval: "weekly"
day: "monday"
23 changes: 19 additions & 4 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
_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._
---
name: Device Plugin Bug report
about: Create a report to help us improve
title: ''
labels: ''

---

_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._

_**Important Note: NVIDIA AI Enterprise customers can get support from NVIDIA Enterprise support. Please open a case [here](https://enterprise-support.nvidia.com/s/create-case)**._

### 1. Issue or feature description

### 2. Steps to reproduce the issue
### 1. Quick Debug Information
* OS/Version(e.g. RHEL8.6, Ubuntu22.04):
* Kernel Version:
* Container Runtime Type/Version(e.g. Containerd, CRI-O, Docker):
* K8s Flavor/Version(e.g. K8s, OCP, Rancher, GKE, EKS):

### 2. Issue or feature description
_Briefly explain the issue in terms of expected behavior and current behavior._

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

Expand All @@ -20,4 +35,4 @@ Additional information that might help better understand your environment and re
- [ ] Any relevant kernel output lines from `dmesg`
- [ ] NVIDIA packages version from `dpkg -l '*nvidia*'` _or_ `rpm -qa '*nvidia*'`
- [ ] NVIDIA container library version from `nvidia-container-cli -V`
- [ ] NVIDIA container library logs (see [troubleshooting](https://github.com/NVIDIA/nvidia-docker/wiki/Troubleshooting))

23 changes: 0 additions & 23 deletions .github/template_issue.md

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copyright 2024 NVIDIA CORPORATION
#
# 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: End-to-end Tests

on:
workflow_run:
workflows: [Image]
types:
- completed
branches:
- main
- release-*

jobs:
e2e-tests:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }} && ${{ github.event.workflow_run.event == 'push' }}
steps:
- uses: actions/checkout@v4
name: Check out code
- name: Calculate build vars
id: vars
run: |
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- name: Set up Holodeck
uses: NVIDIA/holodeck@main
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
holodeck_config: "tests/e2e/holodeck.yaml"
- name: Run e2e tests
env:
KUBECONFIG: ${{ github.workspace }}/kubeconfig
E2E_IMAGE_REPO: ghcr.io/nvidia/k8s-device-plugin
E2E_IMAGE_TAG: ${COMMIT_SHORT_SHA}-ubuntu22.04
LOG_ARTIFACTS: ${{ github.workspace }}/e2e_logs
run: |
make -f tests/e2e/Makefile e2e-test
- name: Archive test logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: e2e-test-logs
path: ./e2e_logs/
retention-days: 15
84 changes: 84 additions & 0 deletions .github/workflows/golang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright 2024 NVIDIA CORPORATION
#
# 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: Golang

on:
pull_request:
types:
- opened
- synchronize
branches:
- main
- release-*
push:
branches:
- main
- release-*

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout code
- name: Get Golang version
id: vars
run: |
GOLANG_VERSION=$( grep "GOLANG_VERSION ?=" versions.mk )
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: -v --timeout 5m
skip-cache: true
- name: Check golang modules
run: make check-vendor
test:
name: Unit test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Golang version
id: vars
run: |
GOLANG_VERSION=$( grep "GOLANG_VERSION ?=" versions.mk )
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
- run: make test
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Golang version
id: vars
run: |
GOLANG_VERSION=$( grep "GOLANG_VERSION ?=" versions.mk )
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
- run: make build
Loading

0 comments on commit 5ffe947

Please sign in to comment.