mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 17:22:33 +00:00
snap: use new GOPATH to build image
Use a new GOPATH to build image in order to avoid clashes with user's GOPATH, otherwise user's kata agent will be used causing problem if that repository is not up to date. Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
51f5c22409
commit
7e312f833b
@ -123,6 +123,9 @@ parts:
|
||||
- docker.io
|
||||
- cpio
|
||||
override-build: |
|
||||
# set GOPATH
|
||||
export GOPATH=$(realpath go)
|
||||
mkdir -p "${GOPATH}"
|
||||
# go was built in parts/go/build
|
||||
export GOROOT=$(realpath ../../go/build)
|
||||
export PATH="${GOROOT}/bin:${PATH}"
|
||||
@ -138,7 +141,7 @@ parts:
|
||||
# use the same go version for all packages
|
||||
sed -i 's|^GO_VERSION=.*|GO_VERSION='$(go version | cut -d' ' -f3 | tr -d go)'|g' rootfs-builder/versions.txt
|
||||
|
||||
sudo -E PATH=$PATH make DISTRO=alpine AGENT_INIT=yes USE_DOCKER=1 initrd
|
||||
sudo -E PATH=$PATH make AGENT_VERSION=${SNAPCRAFT_PROJECT_VERSION} DISTRO=alpine AGENT_INIT=yes USE_DOCKER=1 initrd
|
||||
|
||||
kata_image_dir=${SNAPCRAFT_PART_INSTALL}/usr/share/kata-containers
|
||||
mkdir -p ${kata_image_dir}
|
||||
|
Loading…
Reference in New Issue
Block a user