Skip to content

Commit

Permalink
Merge branch 'master' into mitchzhu/kata-support-test
Browse files Browse the repository at this point in the history
  • Loading branch information
miz060 committed Nov 13, 2024
2 parents 802bb44 + 2daedf8 commit c901afb
Show file tree
Hide file tree
Showing 1,802 changed files with 472,528 additions and 51,798 deletions.
351 changes: 351 additions & 0 deletions .github/README-RENOVATE.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## AgentBaker GitHub Repository

This repository contains the `.github` folder for the AgentBaker project. The `.github` folder is used to store files related to GitHub-specific features and configurations. It typically includes files such as README.md, issue templates, pull request templates, and workflows.

The purpose of this folder is to provide a centralized location for managing the GitHub-related aspects of the AgentBaker project. It helps streamline the development process by providing standardized templates and configurations for issues, pull requests, and other GitHub features.

Please refer to the individual files within this folder for more detailed information on their purpose and usage.

For the descriptions for Renovate.json, please read [README-RENOVATE.md](README-RENOVATE.md)
Binary file added .github/images/JSONata_exerciser_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/Renovate_component_datasource.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/Renovate_minor_enabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
198 changes: 188 additions & 10 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,211 @@
{
"extends": [
"config:base"
],
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"enabledManagers": ["custom.regex"],
"prConcurrentLimit": 50,
"prHourlyLimit": 20,
"prHourlyLimit": 50,
"branchConcurrentLimit": 50,
"separateMinorPatch": true,
"labels": ["renovate"],
"logLevelRemap": [
{
"matchMessage": "/^Custom manager fetcher/",
"newLogLevel": "info"
}
],
"packageRules": [
{
"matchDatasources": ["docker", "custom.deb1804", "custom.deb2004", "custom.deb2204", "custom.deb2404"],
"matchUpdateTypes": [
"minor"
],
"automerge": false,
"enabled": false
},
{
"matchDatasources": ["docker"],
"matchUpdateTypes": [
"patch"
],
"automerge": false,
"enabled": true
},
{
"matchDatasources": ["custom.deb1804"],
"matchUpdateTypes": [
"patch"
],
"additionalBranchPrefix": "deb1804-",
"automerge": false,
"enabled": true
},
{
"matchDatasources": ["custom.deb2004"],
"matchUpdateTypes": [
"patch"
],
"additionalBranchPrefix": "deb2004-",
"automerge": false,
"enabled": true
},
{
"matchDatasources": ["custom.deb2204"],
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"digest"
"patch"
],
"automerge": false
"additionalBranchPrefix": "deb2204-",
"automerge": false,
"enabled": true
},
{
"matchDatasources": ["custom.deb2404"],
"matchUpdateTypes": [
"patch"
],
"additionalBranchPrefix": "deb2404-",
"automerge": false,
"enabled": true
},
{
"matchPackageNames": ["moby-runc", "moby-containerd"],
"assignees": ["devinwong", "anujmaheshwari1", "cameronmeissner", "AlisonB319", "lilypan26", "djsly", "jason1028kr", "UtheMan", "zachary-bailey", "ganeshkumarashok"]
},
{
"matchPackageNames": ["azure-cni", "azure-cns", "containernetworking/azure-cni", "containernetworking/azure-cns"],
"assignees": ["rbtr", "behzad-mir", "QxBytes"]
},
{
"matchPackageNames": ["aks/aks-node-ca-watcher"],
"assignees": ["UtheMan"]
},
{
"matchPackageNames": ["oss/kubernetes/coredns", "oss/v2/kubernetes/coredns"],
"assignees": ["SriHarsha001"]
},
{
"matchPackageNames": ["moby-runc", "moby-containerd"],
"extractVersion": "^v?(?<version>.+)$"
},
{
"matchPackageNames": ["aks/aks-gpu-cuda", "aks/aks-gpu-grid"],
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<prerelease>\\d{14})$",
"automerge": false,
"enabled": true,
"ignoreUnstable": false
}
],
"customManagers": [
{
"customType": "regex",
"description": "auto update containerImages in components.json",
"fileMatch": [
"parts/linux/cloud-init/artifacts/components.json"
],
"matchStringsStrategy": "any",
"matchStrings": [
".*?\"downloadURL\":\\s*\"(?<registryUrl>[^/]+)/(?<packageName>[^:]+)[\\s\\S]*?\"multiArchVersions\": \\[\\s*\"(?<currentValue>[^\\\"]+)\".*"
"\"renovateTag\":\\s*\"registry=(?<registryUrl>[^,]+), name=(?<packageName>[^\"]+)\",\\s*\"latestVersion\":\\s*\"(?<currentValue>[^\"]+)\"(?:[^}]*\"previousLatestVersion\":\\s*\"(?<depType>[^\"]+)\")?"
],
"datasourceTemplate": "docker",
"registryUrlTemplate": "https://mcr.microsoft.com"
"autoReplaceStringTemplate": "\"renovateTag\": \"registry={{{registryUrl}}}, name={{{packageName}}}\",\n \"latestVersion\": \"{{{newValue}}}\"{{#if depType}},\n \"previousLatestVersion\": \"{{{currentValue}}}\"{{/if}}"
},
{
"customType": "regex",
"description": "auto update packages for OS ubuntu 18.04 in components.json",
"fileMatch": [
"parts/linux/cloud-init/artifacts/components.json"
],
"matchStringsStrategy": "any",
"matchStrings": [
"\"renovateTag\":\\s*\"name=(?<packageName>[^\"]+), os=ubuntu, release=18\\.04\",\\s*\"latestVersion\":\\s*\"(?<currentValue>[^\"]+)\"(?:[^}]*\"previousLatestVersion\":\\s*\"(?<depType>[^\"]+)\")?"
],
"datasourceTemplate": "custom.deb1804",
"versioningTemplate": "deb",
"autoReplaceStringTemplate": "\"renovateTag\": \"name={{{packageName}}}, os=ubuntu, release=18.04\",\n \"latestVersion\": \"{{{newValue}}}\"{{#if depType}},\n \"previousLatestVersion\": \"{{{currentValue}}}\"{{/if}}"
},
{
"customType": "regex",
"description": "auto update packages for OS ubuntu 20.04 in components.json",
"fileMatch": [
"parts/linux/cloud-init/artifacts/components.json"
],
"matchStringsStrategy": "any",
"matchStrings": [
"\"renovateTag\":\\s*\"name=(?<packageName>[^\"]+), os=ubuntu, release=20\\.04\",\\s*\"latestVersion\":\\s*\"(?<currentValue>[^\"]+)\"(?:[^}]*\"previousLatestVersion\":\\s*\"(?<depType>[^\"]+)\")?"
],
"datasourceTemplate": "custom.deb2004",
"versioningTemplate": "deb",
"autoReplaceStringTemplate": "\"renovateTag\": \"name={{{packageName}}}, os=ubuntu, release=20.04\",\n \"latestVersion\": \"{{{newValue}}}\"{{#if depType}},\n \"previousLatestVersion\": \"{{{currentValue}}}\"{{/if}}"
},
{
"customType": "regex",
"description": "auto update packages for OS ubuntu 22.04 in components.json",
"fileMatch": [
"parts/linux/cloud-init/artifacts/components.json"
],
"matchStringsStrategy": "any",
"matchStrings": [
"\"renovateTag\":\\s*\"name=(?<packageName>[^\"]+), os=ubuntu, release=22\\.04\",\\s*\"latestVersion\":\\s*\"(?<currentValue>[^\"]+)\"(?:[^}]*\"previousLatestVersion\":\\s*\"(?<depType>[^\"]+)\")?"
],
"datasourceTemplate": "custom.deb2204",
"versioningTemplate": "deb",
"autoReplaceStringTemplate": "\"renovateTag\": \"name={{{packageName}}}, os=ubuntu, release=22.04\",\n \"latestVersion\": \"{{{newValue}}}\"{{#if depType}},\n \"previousLatestVersion\": \"{{{currentValue}}}\"{{/if}}"
},
{
"customType": "regex",
"description": "auto update packages for OS ubuntu 24.04 in components.json",
"fileMatch": [
"parts/linux/cloud-init/artifacts/components.json"
],
"matchStringsStrategy": "any",
"matchStrings": [
"\"renovateTag\":\\s*\"name=(?<packageName>[^\"]+), os=ubuntu, release=24\\.04\",\\s*\"latestVersion\":\\s*\"(?<currentValue>[^\"]+)\"(?:[^}]*\"previousLatestVersion\":\\s*\"(?<depType>[^\"]+)\")?"
],
"datasourceTemplate": "custom.deb2404",
"versioningTemplate": "deb",
"autoReplaceStringTemplate": "\"renovateTag\": \"name={{{packageName}}}, os=ubuntu, release=24.04\",\n \"latestVersion\": \"{{{newValue}}}\"{{#if depType}},\n \"previousLatestVersion\": \"{{{currentValue}}}\"{{/if}}"
},
{
"customType": "regex",
"description": "update version line in any cse_*.sh",
"fileMatch": [
"^.*cse_.*\\.sh"
],
"matchStringsStrategy": "any",
"matchStrings": [
"#\\s*renovate:\\s*(datasource=(?<datasource>.*?) )?depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s*.*?version.*\\\"(?<currentValue>.*)\\\""
]
}
],
"customDatasources": {
"deb1804": {
"defaultRegistryUrlTemplate": "https://packages.microsoft.com/ubuntu/18.04/prod/dists/testing/main/binary-amd64/Packages",
"format": "plain",
"transformTemplates": [
"{\"releases\": $map(($index := releases#$i[version=\"Package: {{packageName}}\"].$i; $map($index, function($i) { $replace(releases[$i + 1].version, /^Version:\\s*/, \"v\") })), function($v) { {\"version\": $v} })}"
]
},
"deb2004": {
"defaultRegistryUrlTemplate": "https://packages.microsoft.com/ubuntu/20.04/prod/dists/testing/main/binary-amd64/Packages",
"format": "plain",
"transformTemplates": [
"{\"releases\": $map(($index := releases#$i[version=\"Package: {{packageName}}\"].$i; $map($index, function($i) { $replace(releases[$i + 1].version, /^Version:\\s*/, \"v\") })), function($v) { {\"version\": $v} })}"
]
},
"deb2204": {
"defaultRegistryUrlTemplate": "https://packages.microsoft.com/ubuntu/22.04/prod/dists/testing/main/binary-amd64/Packages",
"format": "plain",
"transformTemplates": [
"{\"releases\": $map(($index := releases#$i[version=\"Package: {{packageName}}\"].$i; $map($index, function($i) { $replace(releases[$i + 1].version, /^Version:\\s*/, \"v\") })), function($v) { {\"version\": $v} })}"
]
},
"deb2404": {
"defaultRegistryUrlTemplate": "https://packages.microsoft.com/ubuntu/24.04/prod/dists/testing/main/binary-amd64/Packages",
"format": "plain",
"transformTemplates": [
"{\"releases\": $map(($index := releases#$i[version=\"Package: {{packageName}}\"].$i; $map($index, function($i) { $replace(releases[$i + 1].version, /^Version:\\s*/, \"v\") })), function($v) { {\"version\": $v} })}"
]
}
]
}
}
}
12 changes: 1 addition & 11 deletions .github/workflows/check-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
name: "Test coverage"
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:

permissions:
id-token: write
contents: read

env:
SUBSCRIPTION_ID: "8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8"
RESOURCE_GROUP_NAME: "agentbaker-e2e-tests"
LOCATION: "eastus"
CLUSTER_NAME: "agentbaker-e2e-test-cluster"
AZURE_TENANT_ID: "72f988bf-86f1-41af-91ab-2d7cd011db47"

jobs:
unit_tests:
runs-on: ubuntu-latest
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/commit-lint.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: check-tests
name: Go Unit Tests
on: pull_request

jobs:
check-tests:
go-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.22'
- run: |
E2E_TEST=true
export E2E_TEST
make test
name: Unit Test
name: Run unit tests for go code in the repository
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: check-shell
name: Lint Shell/Bash Scripts
on: pull_request

jobs:
check-tests:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -11,4 +11,4 @@ jobs:
go-version: '1.22'
- run: |
make validate-shell
name: Verify Shell scripts
name: Lint shell/bash scripts with ShellCheck
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: check-generated
name: Shell/Bash Script Unit Tests
on: pull_request

jobs:
check-generated:
shellspec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.22'
- run: |
make
git diff --exit-code
name: Make generate and diff
make shellspec
name: Run shell/bash script unit tests with shellspec
20 changes: 5 additions & 15 deletions .github/workflows/validate-components.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
name: Validate component manifest
on:
pull_request:
branches:
- master
workflow_dispatch: {}
name: Validate Components
on: pull_request

jobs:
build-and-deploy:
cue:
runs-on: ubuntu-latest
environment: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.22'
- name: 'install cue'
- name: Install cue
run: |
go version
GOPATH="$(go env | grep GOPATH | cut -d= -f2 | tr -d '"')"
export PATH="$PATH:$GOPATH/bin"
pushd /tmp
GO111MODULE=on go install cuelang.org/go/cmd/cue@latest
popd
- name: 'validate components.json'
run: |
GOPATH="$(go env | grep GOPATH | cut -d= -f2 | tr -d '"')"
export PATH="$PATH:$GOPATH/bin"
cue vet -c ./schemas/manifest.cue
cue eval ./schemas/manifest.cue
- name: 'validate components.json'
- name: Validate components.json conforms to cue schema
run: |
GOPATH="$(go env | grep GOPATH | cut -d= -f2 | tr -d '"')"
export PATH="$PATH:$GOPATH/bin"
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ linters-settings:
shadow:
# Whether to be strict about shadowing; can be noisy.
# Default: false
strict: true
strict: false

nakedret:
# Make an issue if func has more lines of code than this setting, and it has naked returns.
Expand Down
Loading

0 comments on commit c901afb

Please sign in to comment.