Commit Graph

22 Commits

Author SHA1 Message Date
Chelsea Mafrica
9f394f6e18 tests: Use function from Kata repo
Switch to use function from Kata repo in common.bash to reduce
dependency on the tests repo.

Fixes #8713

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-20 16:45:06 -08:00
Chelsea Mafrica
bfb756199f ci: Use static checks from kata repo for lib functions
Change the two functions in lib.sh to use the static checks script from
the kata containers repo instead of tests. Remove cloning the repo from
these functions since we don't need it anymore. Leave these two
functions because the document checking one may be used locally and the
static checks one is called from the virtcontainers Makefile.

Fixes #8681

Signed-off-by: Chelsea Mafrica <chelsea.e.mafrica@intel.com>
2023-12-15 17:08:33 -08:00
Hyounggyu Choi
511dd5feac local-build: add support to build IBM Z SE image
This is to add an artifact for IBM Z SE(TEE) to main.

Fixes: #6754

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-12-04 21:08:51 +01:00
Derek Lee
bed4aab7ee github-actions: Add cargo-deny
Adds cargo-deny to scan for vulnerabilities and license issues regarding
rust crates.

GitHub Actions does not have an obvious way to loop over each of the
Cargo.toml files. To avoid hardcoding it, I worked around the problem
using a composite action that first generates the cargo-deny action by
finding all Cargo.toml files before calling this new generated action in
the master workflow.

Uses recommended deny.toml from cargo-deny repo with the following
modifications:

 ignore = ["RUSTSEC-2020-0071"]
  because chrono is dependent on the version of time with the
  vulnerability and there is no simple workaround

 multiple-versions = "allow"
  Because of the above error and other packages, there are instances
  where some crates require different versions of a crate.

 unknown-git = "allow"
  I don't see a particular issue with allowing crates from other repos.
  An alternative would be the manually set each repo we want in an
  allow-git list, but I see this as more of a nuisance that its worth.
  We could leave this as a warning (default), but to avoid clutter I'm
  going to allow it.

If deny.toml needs to be edited in the future, here's the guide:
https://embarkstudios.github.io/cargo-deny/index.html

Fixes #3359

Signed-off-by: Derek Lee <derlee@redhat.com>
2022-08-30 09:30:03 -07:00
Manabu Sugimoto
48ccd42339 ci: Set safe.directory against tests repository
Set `safe.directory` against `kata-containers/tests` repository
before checkout because the user in the docker container is root,
but the `tests` repository on the host machine is usually owned
by the normal user.
This works when we already have the `tests` repository which is
not owned by root on the host machine and try to create a rootfs
using Docker (`USE_DOCKER=true`).

Fixes: #4561

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2022-06-30 17:36:29 +09:00
David Gibson
13c2577004 runtime: Move go testing script locally
The go unit tests for the runtime are invoked by the helper script
ci/go-test.sh.  Which calls the run_go_test() function in ci/lib.sh.  Which
calls into .ci/go-test.sh from the tests repository.

But.. the runtime is the only user of this script, and generally stuff for
unit tests (rather than functional or integration tests) lives in the main
repository, not the tests repository.

So, just move the actual script into src/runtime.  A change to remove it
from the tests repo will follow.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-05-13 13:14:37 +10:00
Fabiano Fidêncio
aa6886f1ed
Merge pull request #2482 from Bevisy/main-815
ci: Weekly check whether the docs url is alive
2022-03-21 17:15:40 +01:00
Jakob Naucke
1721197934
ci: Pass function arguments in static-checks.sh
e.g. when called from the tests repo

Fixes: #3525
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2022-01-24 12:05:10 +01: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
Jakob Naucke
c10425233b
ci: expand $CI to nothing
PR #2252 put `set -o nounset` in `ci/lib.sh`. It turns out that this
won't work when `$CI` is unset (it is always set in CI). Expand `$CI` to
nothing.

Fixes: #2283
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-20 15:55:36 +02:00
Jakob Naucke
4f23b8cd47
ci: set -o nounset
This avoids confusion e.g. when `$GOPATH` is unset.

Fixes: #2251
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-07-19 11:26:01 +02:00
Snir Sheriber
9b8cc4581d ci: static checks: use defined target_branch
Fixes: #2214
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
2021-07-12 15:38:37 +03:00
Wainer dos Santos Moschetta
16f732fc18 ci/lib: Use git to clone the tests repository
On clone_tests_repo() use git instead of `go get` to clone and/or
update the tests repository.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2021-04-06 13:44:02 -04:00
Peng Tao
fd5592d4d5 branch: change 2.0-dev to main
Change all mentioning of 2.0-dev to main so that we can rename the
default branch to main.

Fixes: #1310
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2021-01-22 15:49:35 +08:00
Salvador Fuentes
1984e635de ci: fix clone_tests_repo function
We should not checkout to 2.0-dev branch in the clone_tests_repo
function when running in Jenkins CI as it discards changes from
tests repo.

Fixes: #818.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-09-29 08:56:11 -04:00
Peng Tao
c05c4ba5e7 ci: always checkout 2.0-dev of test repository
We use 2.0-dev in the tests repository now. Always make sure
we use the right branch.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-09-28 11:01:07 +08:00
bin liu
357d788517 ci: replace spaces by tabs as indent
Replace spaces by tabs as indent in file ci/lib.sh

Fixes: #743

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-17 11:14:21 +08:00
Peng Tao
1283febdd6 ci: checkout TRAVIS_BRANCH
So that we use 2.0-dev branch for tests.

Fixes: kata-containers/tests#2732
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-07-24 20:06:02 +08:00
Peng Tao
241d52d4fa travis: enable runtime
Run make and test for both agent and runtime.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-29 02:44:12 -07:00
Gabriela Cervantes
4edf5379ca ci: Remove run_rust_test functions as not being used
This PR removes a function that is never used as the script that is
referring is also non existing at the test repository.

Fixes #113

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-01-14 14:23:14 -06: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
Yang Bo
f8ced638d2 rust-agent: Land rust agent into kata-containers
Fixes: #56

Signed-off-by: Yang Bo <bo@hyper.sh>
2019-10-31 10:46:45 +08:00