mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-10 13:19:08 +00:00
Merge pull request #1408 from devimc/2021-02-12/FixSnapCI
[backport] Fix Snap CI
This commit is contained in:
12
.github/workflows/snap.yaml
vendored
12
.github/workflows/snap.yaml
vendored
@@ -1,15 +1,5 @@
|
|||||||
name: snap CI
|
name: snap CI
|
||||||
on:
|
on: ["pull_request"]
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "**/Makefile"
|
|
||||||
- "**/*.go"
|
|
||||||
- "**/*.mk"
|
|
||||||
- "**/*.rs"
|
|
||||||
- "**/*.sh"
|
|
||||||
- "**/*.toml"
|
|
||||||
- "**/*.yaml"
|
|
||||||
- "**/*.yml"
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
@@ -69,7 +69,7 @@ parts:
|
|||||||
tar -xf ${tarfile} --strip-components=1
|
tar -xf ${tarfile} --strip-components=1
|
||||||
|
|
||||||
image:
|
image:
|
||||||
after: [godeps]
|
after: [godeps, qemu, kernel]
|
||||||
plugin: nil
|
plugin: nil
|
||||||
build-packages:
|
build-packages:
|
||||||
- docker.io
|
- docker.io
|
||||||
@@ -89,6 +89,8 @@ parts:
|
|||||||
export GOROOT=${SNAPCRAFT_STAGE}
|
export GOROOT=${SNAPCRAFT_STAGE}
|
||||||
export PATH="${GOROOT}/bin:${PATH}"
|
export PATH="${GOROOT}/bin:${PATH}"
|
||||||
|
|
||||||
|
http_proxy=${http_proxy:-""}
|
||||||
|
https_proxy=${https_proxy:-""}
|
||||||
if [ -n "$http_proxy" ]; then
|
if [ -n "$http_proxy" ]; then
|
||||||
echo "Setting proxy $http_proxy"
|
echo "Setting proxy $http_proxy"
|
||||||
sudo -E systemctl set-environment http_proxy=$http_proxy || true
|
sudo -E systemctl set-environment http_proxy=$http_proxy || true
|
||||||
@@ -169,7 +171,7 @@ parts:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
kernel:
|
kernel:
|
||||||
after: [godeps, image]
|
after: [godeps]
|
||||||
plugin: nil
|
plugin: nil
|
||||||
build-packages:
|
build-packages:
|
||||||
- libelf-dev
|
- libelf-dev
|
||||||
@@ -183,8 +185,8 @@ parts:
|
|||||||
|
|
||||||
cd ${kata_dir}/tools/packaging/kernel
|
cd ${kata_dir}/tools/packaging/kernel
|
||||||
|
|
||||||
# Say 'no' to everithing, fix issues with incomplete .config files
|
# Setup and build kernel
|
||||||
yes "n" | ./build-kernel.sh setup
|
./build-kernel.sh -d setup
|
||||||
kernel_dir_prefix="kata-linux-"
|
kernel_dir_prefix="kata-linux-"
|
||||||
cd ${kernel_dir_prefix}*
|
cd ${kernel_dir_prefix}*
|
||||||
version=$(basename ${PWD} | sed 's|'"${kernel_dir_prefix}"'||' | cut -d- -f1)
|
version=$(basename ${PWD} | sed 's|'"${kernel_dir_prefix}"'||' | cut -d- -f1)
|
||||||
@@ -206,7 +208,7 @@ parts:
|
|||||||
|
|
||||||
qemu:
|
qemu:
|
||||||
plugin: make
|
plugin: make
|
||||||
after: [godeps, runtime]
|
after: [godeps]
|
||||||
build-packages:
|
build-packages:
|
||||||
- gcc
|
- gcc
|
||||||
- python3
|
- python3
|
||||||
|
Reference in New Issue
Block a user