Skip to content

Commit

Permalink
build in container (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshnokia authored Feb 1, 2018
1 parent ff26b0f commit ef54d7b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM registry.mv.nuagenetworks.net:5000/build/golang:1.9

RUN yum install -y rpm-build &&\
mkdir -p /BUILD/go/src/github.com/nuagenetworks/nuage-libnetwork

WORKDIR /BUILD/go/src/github.com/nuagenetworks/nuage-libnetwork
21 changes: 21 additions & 0 deletions docker_build_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -x

USER_ID=$(id -u)
GROUP_ID=$(id -g)
DOCKERFILE="Dockerfile.build"
PWD=$(pwd)
docker run --privileged \
-e NUAGE_PROJECT=${NUAGE_PROJECT} \
-e NUAGE_BUILD_RELEASE=${NUAGE_BUILD_RELEASE} \
-e NUAGE_BUILD_NUMBER=${NUAGE_BUILD_NUMBER} \
-e version=${NUAGE_PROJECT}.${NUAGE_BUILD_RELEASE} \
-e GOPATH=/BUILD/go \
-e USER_ID=${USER_ID} \
-e GROUP_ID=${GROUP_ID} \
-v ${PWD}:/BUILD/go/src/github.com/nuagenetworks/nuage-libnetwork \
-v /usr/global:/usr/global \
-v /root:/root \
registry.mv.nuagenetworks.net:5000/build/nuage-libnetwork \
sh scripts/buildRPM.sh

0 comments on commit ef54d7b

Please sign in to comment.