Commit Graph

19 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
7f94b70905 ci: Add steps to build obs packages.
- OBS packages are build based on kata head
- The OBS kata branch is created on demand
- TODO: Delete branch when is not needed anymore

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-06-28 23:47:32 -05:00
Julio Montes
d832e65c26 obs-packaging/gen_versions: add --head option
Add `--head` option to use the head of the branch instead of the kata
version to generated the hashes for the packages. With this new option
kata packages can be generated using the latest commit on master.

fixes #566

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-06-11 14:28:15 -05:00
Ganesh Maharaj Mahalingam
d72d5daa32 release: initialize CI variable in lib.sh
Recent change to always build tools from the local repository if the
script is run in a CI environment fails during a release build as the
variable ${CI} is not initialized. This fix addresses that issue.

Fixes: #537
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-06-05 13:54:11 -07:00
nitkon
3d0b60fefd lib.sh: Pass right parameters to build image
Creating Kata packages fails
due to "Makefile:58: *** target pattern
contains no '%'.  Stop" error. Fix it.

Fixes: #539 

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-05-24 17:02:23 +05:30
Ganesh Maharaj Mahalingam
ceab0f0f1a ci: always use the versions from the local repository for CI
the versions.yaml file in runtime carries the information on all the
components we use and ship with kata. It would be nice to have the CI
test the newer versions when the file is changed and CI is triggered.
The current code always fetches from the master tree from github and
that does not help to validate version changes before it lands in the
tree.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-05-22 10:21:46 -07:00
Jose Carlos Venegas Munoz
3a1bb3fb7a lib.sh: dont do readonly on sourced files.
Files could be sourced more than one time lets not use readonly.

Fixes: #487

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-08 13:27:05 -05:00
Jose Carlos Venegas Munoz
5b1ddd0b37 lib: versions: use branch variable
If branch is provided not use master.

When buiding packages the master repository is used
this is bad for stable releases. Use the BRANCH variable
exported in releases.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-03 10:09:02 -05:00
Jose Carlos Venegas Munoz
c7225fe0c8 obs: Remove golang from osc dockerfile
Reduce pipeline time by not installing golang.

golang is not needed to use osc, it makes slower the image creation.

- remove go dependency from pacakge lib

Remove calls to golang, this will be not not installed in
the docker image.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-03 10:01:16 -05:00
Ganesh Maharaj Mahalingam
3771b04d6f kernel: Make sure local versions.yaml file from runtime get precedence
Fixes: #431

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-04-09 11:44:09 -07:00
Jose Carlos Venegas Munoz
54c4a017f0 lib: pkgs: Dont query host version file.
We do releases based on kata branches lets get a fresh
versions file as the one in the host may be not updated.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-03-04 08:41:27 -06:00
Jose Carlos Venegas Munoz
2e93dbd737 kernel: build: Use local kernel version.
If the runtime repository is already cloned get version from it,
else keep getting from github.

Fixes: #299

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-01-08 15:23:12 -06:00
Jose Carlos Venegas Munoz
33214c90d6 image: Make sure agent sha is correct
Fix image generation.

Instead of use agent code from the host checkout to the
agent source code in a clean GOPATH env.

Make sure that the agent `commit id` is the correct before
push to github or OBS.

Fixes: #166

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-30 20:56:50 -05:00
Jose Carlos Venegas Munoz
2590f2b91e format: use shfmt to format sh files.
Use shfmt to format all the sh file.

https://github.com/mvdan/sh

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-16 16:45:35 -05:00
Jose Carlos Venegas Munoz
8c223e811c lib: get deps based in a branch.
We want to create pacakges based in different branches modify
function to get the yaml version needed to to that.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-08-14 14:00:36 -05:00
Jose Carlos Venegas Munoz
b4a6303b14 ci: Fix ci when tmp_dir is not set.
When tmp_dir is not set and lib.sh is sourced
could lead to fail.

Fix: #116

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-31 15:21:20 -05:00
Jose Carlos Venegas Munoz
dfddde813d lib: move build_hub to lib
hub will be used by other script move it.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-31 10:22:52 -05:00
Jose Carlos Venegas Munoz
6fa5b7945e pkgs: image: Get image version from version.yaml
Build image with agent and osbuilder with master by default.

If want to build a release tag just use -v <version> and
will use that osbuilder and agent tag.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-26 13:04:23 -05:00
Jose Carlos Venegas Munoz
f1bfbe62a3 qemu: add scripts to build static qemu.
Use a dockerfile to build an static qemu.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-20 09:35:24 -05:00
Jose Carlos Venegas Munoz
d5438ea131 lib: common functions.
Add functions to be used across the repository.

- get kata version deps
- die
- info

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-06-19 10:17:45 -05:00