Skip to content

Commit

Permalink
Merge pull request #1 from jmt-lab/develop
Browse files Browse the repository at this point in the history
Migrate history of packages from core kit to kernel kit
  • Loading branch information
jmt-lab authored Dec 11, 2024
2 parents c40e631 + 1e29a94 commit 849ab0c
Show file tree
Hide file tree
Showing 225 changed files with 28,410 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/.git
/.gomodcache
/build/*
!/build/rpms/
/build/rpms/*
!/build/rpms/*.rpm
/build/rpms/*-debuginfo-*.rpm
/build/rpms/*-debugsource-*.rpm
**/target/*
/sbkeys
/tests
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report - build process
about: Let us know about a problem with the build process
labels: status/needs-triage, type/bug
---

<!--
Tips:
- Please search for similar issues, including closed issues.
- Please include details about the environment you're running in.
- Please include any error messages you received, with any required context.
-->

**Platform I'm building on:**



**What I expected to happen:**



**What actually happened:**



**How to reproduce the problem:**


19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Request a change to to the project
labels: status/needs-triage, type/enhancement
---

<!--
Tips:
- Please search for similar requests, including closed issues.
- Please include details about the environment you're running in.
-->

**What I'd like:**



**Any alternatives you've considered:**


28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report - Bottlerocket package
about: Let us know about a problem with Bottlerocket
labels: status/needs-triage, type/bug
---

<!--
Tips:
- Please search for similar issues, including closed issues.
- Please include details about the environment you're running in.
- Please include any error messages you received, with any required context.
-->

**Package I'm using:**



**What I expected to happen:**



**What actually happened:**



**How to reproduce the problem:**


21 changes: 21 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Node setup"
description: "Performs setup for caching and other common needs."
runs:
using: "composite"
steps:
- run: sudo apt -y install build-essential openssl libssl-dev pkg-config liblz4-tool clang
shell: bash
- uses: actions/cache/restore@v4
# Restore most recent cache if available.
with:
path: |
~/.cargo
.cargo
.gomodcache
build/external-kits
build/rpms
build/state
target
key: build-cache
- run: cargo install cargo-make
shell: bash
28 changes: 28 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "area/dependencies"

# We maintain updates for most dependencies. This disables updates other than
# security ones.
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
labels:
- "area/dependencies"
open-pull-requests-limit: 0

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
labels:
- "area/dependencies"
open-pull-requests-limit: 0
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
Tips:
- Please read CONTRIBUTING.md to understand our process and our requests for PRs.
- Please file an issue before creating a PR so we can discuss the change and confirm it's not already being worked on.
-->

**Issue number:**

Closes #

**Description of changes:**



**Testing done:**



**Terms of contribution:**

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build
on:
pull_request:
branches: [develop]
# Here we list file types that don't affect the build and don't need to use
# up our Actions runners.
paths-ignore:
# draw.io (diagrams.net) files, the source of png images for docs
- '**.drawio'
# Example configuration files
- '**.example'
# Markdown documentation
- '**.md'
# Images for documentation
- '**.png'
# Templates for README files
- '**.tpl'
# Sample config files and OpenAPI docs
- '**.yaml'
# Bottlerocket Security Advisories
- 'advisories/**'
# VSCode configurations
- '.vscode/**'

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_32-core
continue-on-error: true
strategy:
matrix:
arch: [x86_64, aarch64]
fail-fast: false
name: "Build ${{ matrix.arch }}"
steps:
- name: Random delay
run: |
delay=$((1 + $RANDOM % 32))
echo "Waiting ${delay} seconds before execution"
sleep $delay
- uses: actions/checkout@v4
- name: Preflight step to set up the runner
uses: ./.github/actions/setup-node
- run: rustup component add rustfmt
- run: make twoliter check-licenses
- run: make twoliter unit-tests
# Avoid running Go lint check via `cargo make check-lints` since there's a separate golangci-lint workflow
- run: make twoliter check-fmt
- run: make twoliter check-clippy
- run: make twoliter check-shell
- run: make ARCH="${{ matrix.arch }}"
61 changes: 61 additions & 0 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This workflow caches external dependencies, build tools, and the most recent artifacts.
# The cache is only usable by workflows started from pull requests against the develop branch.
name: CacheLatest
on:
push:
branches: [develop]
jobs:
cache:
if: github.repository == 'bottlerocket-os/bottlerocket-kernel-kit'
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_32-core
concurrency:
group: cache-${{ github.ref }}
cancel-in-progress: true
env:
cache-key: build-cache
permissions:
actions: write
steps:
- uses: actions/checkout@v4
# Install dependencies for twoliter and cargo-make.
- run: sudo apt -y install build-essential openssl libssl-dev pkg-config liblz4-tool
shell: bash
# Install cargo-make.
- run: cargo install cargo-make
shell: bash
# This installs twoliter.
- run: make prep
# This fetches any external kit dependencies.
- run: make fetch
# This fetches Rust crate and Go module dependencies.
- run: make twoliter fetch
# This builds the current packages and kits.
- run: make ARCH=x86_64
- run: make ARCH=aarch64
# Delete packages that aren't needed for other builds.
- run: |
find build/rpms -name '*debugsource*' -type f -print -delete
find build/rpms -name '*debuginfo*' -type f -print -delete
find build/rpms -name '*kmod*nvidia*' -type f -print -delete
# Remove the previous cache (if it exists).
- run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "${{ env.cache-key }}" --confirm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
# This caches the reusable artifacts for future CI runs.
- uses: actions/cache/save@v4
# Save Rust dependencies
with:
path: |
~/.cargo
.cargo
.gomodcache
build/external-kits
build/rpms
build/state
target
key: ${{ env.cache-key }}
30 changes: 30 additions & 0 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: golangci-lint
on:
pull_request:
branches: [develop]
# Only run this workflow if Go files or this workflow have been modified
paths:
- '**.go'
- '*/go.mod'
- '*/go.sum'
- '.github/workflows/golangci-lint.yaml'

jobs:
golangci-lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.21
- uses: actions/checkout@v4
- name: lint-host-ctr
uses: golangci/golangci-lint-action@v6
with:
version: latest
working-directory: sources/host-ctr
- name: lint-ecs-gpu-init
uses: golangci/golangci-lint-action@v6
with:
version: latest
working-directory: sources/ecs-gpu-init
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/build
*.tar.*
*.tgz
**/target/
**/vendor/
/.cargo
/.gomodcache
/html
/Infra.toml
/Test.toml
/testsys.kubeconfig
/*.pem
/keys
/roles
/sbkeys/**/
/Licenses.toml
/licenses
*.run
/tests
Twoliter.override
18 changes: 18 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
linters:
enable:
- errcheck
- goimports
- ineffassign
- misspell
- revive
- staticcheck
- unconvert
- unused
- govet

run:
timeout: 3m
issues:
exclude-dirs:
- vendor
- .gomodcache
34 changes: 34 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Jacob Peddicord <[email protected]> <[email protected]>
Jacob Vallejo <[email protected]>
Jamie Anderson <[email protected]> <[email protected]>
Michael Patraw <[email protected]> <[email protected]>
Samuel Mendoza-Jonas <[email protected]> <[email protected]>
Tom Kirchner <[email protected]> <[email protected]>
Zac Mrowicki <[email protected]>
Zac Mrowicki <[email protected]> <[email protected]>
Mahdi Chaker <[email protected]> M <[email protected]>
Arnaldo Garcia Rincon <[email protected]>
Arnaldo Garcia Rincon <[email protected]> <[email protected]>
Ben Cressey <[email protected]> <[email protected]>
Erikson Tung <[email protected]>
Jacob Vallejo <[email protected]> <[email protected]>
John McBride <[email protected]> <[email protected]>
Kyle J. Davis <[email protected]> <[email protected]>
Markus Boehme <[email protected]> <[email protected]>
Matthew James Briggs <[email protected]>
Matthew James Briggs <[email protected]> <[email protected]>
Matthew James Briggs <[email protected]> <[email protected]>
Matthew James Briggs <[email protected]> Matt Briggs <[email protected]>
Matthew Yeazel <[email protected]> <[email protected]>
Matthias Sterckx <[email protected]>
Samuel Karp <[email protected]> <[email protected]>
Sanika Shah <[email protected]> <[email protected]>
Sean Kelly <[email protected]> <[email protected]>
Sean McGinnis <[email protected]> <[email protected]>
Sean P. Kelly <[email protected]> <[email protected]>
Shailesh Gothi <[email protected]> <[email protected]>
Tianhao Geng <[email protected]> <[email protected]>
Tianhao Geng <[email protected]> <[email protected]>
Ethan Pullen <[email protected]>
Ethan Pullen <[email protected]> <[email protected]>
Shikha Vyaghra <[email protected]> <[email protected]>
Loading

0 comments on commit 849ab0c

Please sign in to comment.