Commit Graph

28 Commits

Author SHA1 Message Date
Aurélien Bombo
9585e608e5 ci: static-checks: Auto-detect repo by default
This auto-detects the repo by default (instead of having to specify
KATA_DEV_MODE=true) so that forked repos can leverage the static-checks.yaml CI
check without modification.

An alternative would have been to pass the repo in static-checks.yaml. However,
because of the matrix, this would've changed the check name, which is a pain to
handle in either the gatekeeper/GH UI.

Example fork failure:
https://github.com/microsoft/kata-containers/actions/runs/16656407213/job/47142421739#step:8:75

I've tested this change to work in a fork.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2025-07-31 14:33:24 -05:00
Chelsea Mafrica
b46cb22270 static-checks: Direct Makefile to use new static checks
Direct the Makefile to use the static checks script in the tests
directory of the main Kata Containers repo so it is run in GHA.

Fixes #8595

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-12 16:43:35 -08:00
Gabe Venberg
69fdd05ce5 kata-ctl: Moved log-parser-rs into kata-ctl
Log-parser-rs was always intended to become a sub-functionality of
kata-ctl, but it was useful to develop it and initaly merge it as a
standalone program, and migrate it to a subcommand later.

Fixes #6797

Signed-off-by: Gabe Venberg <gabevenberg@gmail.com>
2023-12-07 21:35:28 -06:00
Fabiano Fidêncio
38a7b5325f packaging/tools: Add kata-debug
kata-debug is a tool that is used as part of the Kata Containers CI to gather
information from the node, in order to help debugging issues with Kata
Containers.

As one can imagine, this can be expanded and used outside of the CI context,
and any contribution back to the script is very much welcome.

The resulting container is stored at the [Kata Containers quay.io
space](https://quay.io/repository/kata-containers/kata-debug) and can
be used as shown below:
```sh
kubectl debug $NODE_NAME -it --image=quay.io/kata-containers/kata-debug:latest
```

Fixes: #7397

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-07-21 14:05:30 +02:00
Gabe Venberg
6594a9329d tools: made log-parser-rs
Eventual replacement of kata-log-parser, but for now replicates its
functionaility for the new runtime-rs syntax. Takes in log files,
parses, sorts by timestamp, spits them out in json, csv, xml, toml, and
a few others.

Fixes #5350

Signed-off-by: Gabe Venberg <gabevenberg@gmail.com>
2023-05-02 13:16:54 -05:00
Archana Shinde
c3836010a8 make: clean up obsolete targets
Cleanup targets that have been removed in the past when the
makefile for kata-deploy was included.
Instead, add targets from the makefile under local-build kata-deploy.

Fixes: #6165

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-02-08 13:41:40 -08:00
Bin Liu
e723bad0af ci: let static checks don't depend on build
Build is a time consumable operation, skip build while let
ci run faster.

Fixes: #5777

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-11-28 15:26:04 +08:00
James O. D. Hunt
d3ee8d9f1b
Merge pull request #5388 from jodh-intel/kata-ctl
kata-ctl: Move development to main branch
2022-10-12 14:29:35 +01:00
James O. D. Hunt
2b345ba29d build: Add kata-ctl to tools list
Update the top-level Makefile to build the `kata-ctl` tool by default.

Fixes: #4499, #5334.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2022-10-11 10:05:16 +01:00
wllenyj
2ddc948d30 Makefile: add dragonball components.
Enable ci to run dragonball unit tests.

Fixes: #4899

Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
2022-10-10 16:41:40 +08:00
Zack
278f843f92 runtime-rs: shim implements for runtime-rs
Responsible for processing shim related commands: start, delete.

This patch is extracted from Alibaba Cloud's internal repository *runD*
Thanks to all contributors!

Fixes: #3785
Signed-off-by: acetang <aceapril@126.com>
Signed-off-by: Bin Liu <bin@hyper.sh>
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
Signed-off-by: Fupan Li <lifupan@gmail.com>
Signed-off-by: gexuyang <gexuyang@linux.alibaba.com>
Signed-off-by: Helin Guo <helinguo@linux.alibaba.com>
Signed-off-by: He Rongguang <herongguang@linux.alibaba.com>
Signed-off-by: Hui Zhu <teawater@gmail.com>
Signed-off-by: Issac Hai <hjwissac@linux.alibaba.com>
Signed-off-by: Jiahuan Chao <jhchao@linux.alibaba.com>
Signed-off-by: lichenglong9 <lichenglong9@163.com>
Signed-off-by: mengze <mengze@linux.alibaba.com>
Signed-off-by: Qingyuan Hou <qingyuan.hou@linux.alibaba.com>
Signed-off-by: Quanwei Zhou <quanweiZhou@linux.alibaba.com>
Signed-off-by: shiqiangzhang <shiyu.zsq@linux.alibaba.com>
Signed-off-by: Simon Guo <wei.guo.simon@linux.alibaba.com>
Signed-off-by: Tim Zhang <tim@hyper.sh>
Signed-off-by: wanglei01 <wllenyj@linux.alibaba.com>
Signed-off-by: Wei Yang <wei.yang1@linux.alibaba.com>
Signed-off-by: yanlei <yl.on.the.way@gmail.com>
Signed-off-by: Yiqun Leng <yqleng@linux.alibaba.com>
Signed-off-by: yuchang.xu <yuchang.xu@linux.alibaba.com>
Signed-off-by: Yves Chan <lingfu@linux.alibaba.com>
Signed-off-by: Zack <zmlcc@linux.alibaba.com>
Signed-off-by: Zhiheng Tao <zhihengtao@linux.alibaba.com>
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
Signed-off-by: Zizheng Bian <zizheng.bian@linux.alibaba.com>
2022-06-10 19:56:59 +08:00
Liu Jiang
6f8acb94c2 libs: refine Makefile rules
Refine Makefile rules to better support the KATA ci env.

Fixes: #3536

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-06-10 18:25:24 +08:00
Liu Jiang
392f1ecdf5 libs: convert to a cargo workspace
Convert libs into a Cargo workspace, so all libraries could share the
build infrastructure.

Fixes #3282

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-06-10 18:25:24 +08:00
Snir Sheriber
c7dacb1211 log-parser: move the kata-log-parser from the tests repo
to the kata-containers repo under the src/tools/log-parser folder
and vendor the modules

Fixes: #4100
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2022-05-10 13:23:25 +03:00
Manabu Sugimoto
b221a2590f tools: Add runk
Add a Rust-based standard OCI container runtime based on
Kata agent.

You can build and install runk as follows:

```sh
$ cd src/tools/runk
$ make
$ sudo make install
$ runk --help
```

Fixes: #2784

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2022-04-28 00:48:57 +09:00
Binbin Zhang
168fadf1de ci: Weekly check whether the docs url is alive
Weekly check(at 23:00 every Sunday) whether the docs url is ALIVE, so that
we can find the failed url in time

Fixes #815

Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
2022-01-20 19:56:15 +08:00
Peng Tao
7c4263b3e1 src: reorg source directories
To make the code directory structure more clear:

└── src
    ├── agent
    ├── libs
    │   └── logging
    ├── runtime
    ├── runtime-rs (to be added)
    └── tools
        ├── agent-ctl
        └── trace-forwarder

Fixes: #3204
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2021-12-14 10:30:08 +08:00
James O. D. Hunt
d47484e7c1 logging: Always run crate tests
Ensure the tests in the local `logging` crate are run for all consumers
of it.

Additionally, add a new test which checks that output is generated by a
range of different log level `slog` macros. This is designed to ensure
debug level output is always available for the consumers of the
`logging` crate.

Fixes: #2969.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-04 17:26:52 +00:00
James O. D. Hunt
5c9c0b6e62 build: Fix default target
Fixed the top-level build which was broken: the kata deploy
Makefile was being sourced, but it was defining the first target, which
became the default.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2021-11-04 16:30:50 +00:00
Carlos Venegas
96e1246bce makefile: Include kata-deploy targets
Use kata-deploy targets from toplevel.
This will help if want to build and
reinstall just one single kata component.

Signed-off-by: Carlos Venegas <jose.carlos.venegas.munoz@intel.com>
2021-09-09 14:32:08 +00:00
Carlos Venegas
85987c6d79 kata-deploy: Add Makefile
Add makefile to document possible options to run.

e.g
Default: Create a kata tarball, it will build assets concurrently.
```
$ make

```

Create a tarball build for cloud-hypervisor.
```
$ make cloud-hypervisor
```

Signed-off-by: Carlos Venegas <jos.c.venegas.munoz@intel.com>
2021-07-28 19:45:35 +00:00
Wainer dos Santos Moschetta
afd9785051 makefile: Add static-checks target
Added the 'static-checks' make target to allow developers to easily run
the static checks locally.

Fixes #2206
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-07-14 15:54:06 -03:00
Fabiano Fidêncio
ac8f972e4b build: Add make vendor
Add a top-level `vendor` entry, which will help us when adding the
vendor check as part of the static checks.

Related: #2159

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2021-07-14 13:59:41 +02:00
Peng Tao
0fd1eb59a4 Makefile: add default rule
Otherwise `make` would only build the agent.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-06-27 20:16:53 -07:00
James O. D. Hunt
b2cc403eca build: Improve top-level Makefile
Define a set of functions that support the standard rules (build,
install, test, *etc*). Then simply add new components and tools to the
appropriate variable to support all the standard build semantics.

Fixes #331.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2020-06-25 11:19:12 +01:00
bin liu
a3eb0c970e Agent: centrally manage proto files
In Kata 1.x, agent interface is defined in agent repo and vendored by runtime. But in Kata 2.0, agent and runtime will use ttrpc as protocol, and agent is using rust language, so runtime can't vendor agent again, have to compile from agent's protobuf files.

This PR will hold proto files under src/agent, and compile it to rust/go sources for agent/runtime. Typing `make generate-protocols` under root of this repo or `src/agent` can see how to use it.

Signed-off-by: bin liu <bin@hyper.sh>
2020-05-27 21:05:36 +08:00
Peng Tao
f53901ad43 makefile: add more build targets
To make it easy to build and test.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-05-25 23:30:42 -07:00
Gabriela Cervantes
3881c06578 ci: Add minimal makefile to use central go test script
This adds a basic Makefile where we can use a central go test script
in order to run the tests for the CI.

Fixes #109

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-01-03 10:04:09 -06:00