Skip to content

Commit

Permalink
a lot of changes, e.g. podman removed totally as buildah is enough fo…
Browse files Browse the repository at this point in the history
…r us
  • Loading branch information
Laszlo Janosi authored and Levovar committed Jan 22, 2019
1 parent 7502d02 commit c26c8d2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ script:
- mkdir -p $GOPATH/src/github.com/nokia/danm/
- mv * $GOPATH/src/github.com/nokia/danm/
- cd $GOPATH/src/github.com/nokia/danm/
- sudo ./build_danm.sh
- ./build_danm.sh
13 changes: 0 additions & 13 deletions .travis/install_buildah.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash

if [[ $WITH_BUILDAH == 'Y' ]]; then

sudo rm -f "$(command -v docker)"

sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:alexlarsson/flatpak
Expand All @@ -29,15 +27,4 @@ if [[ $WITH_BUILDAH == 'Y' ]]; then
EOF

sudo apt-get -y install libprotobuf-dev libprotobuf-c0-dev python3-setuptools
git clone https://github.com/kubernetes-sigs/cri-o "$GOPATH/src/github.com/kubernetes-sigs/cri-o"
cd "$GOPATH/src/github.com/kubernetes-sigs/cri-o" || exit
mkdir bin
make bin/conmon
sudo install -D -m 755 bin/conmon /usr/libexec/podman/conmon

git clone https://github.com/containers/libpod/ "$GOPATH/src/github.com/containers/libpod"
cd "$GOPATH/src/github.com/containers/libpod" || exit
make
sudo make install PREFIX=/usr
fi
4 changes: 3 additions & 1 deletion build_buildah.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ echo 'Building DANM builder container'
buildah bud --no-cache -t danm_builder:1.0 build/

echo 'Running DANM build'
podman run --rm=true --net=host --name="danm_build" -v $GOPATH/bin:/go/bin -v $GOPATH/src:/go/src danm_builder:1.0
build_container=$(buildah from danm_builder:1.0)
buildah run --net=host -v $GOPATH/bin:/go/bin -v $GOPATH/src:/go/src $build_container /bin/sh -c /build.sh
buildah rm $build_container

echo 'Cleaning up DANM builder container'
buildah rmi -f danm_builder:1.0
Expand Down
6 changes: 3 additions & 3 deletions build_danm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ error_handler()
exit $1
}

if [ -x "$(command -v docker)" ]; then
source ./build_docker.sh
elif [ -x "$(command -v buildah)" ] && [ -x "$(command -v podman)" ]; then
if [ -x "$(command -v buildah)" ]; then
source ./build_buildah.sh
elif [ -x "$(command -v docker)" ]; then
source ./build_docker.sh
else
echo 'The build process requires docker or buildah/podman installed. Please install any of these and make sure these are executable'
exit 1
Expand Down

0 comments on commit c26c8d2

Please sign in to comment.