aboutsummaryrefslogtreecommitdiffstats
path: root/deployments
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2018-09-04 15:58:56 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-04 15:58:56 +0000
commit6e2857125fdce17a1541f3ca45ee0b988e9ef4de (patch)
treea8ee559dd73c9c330894ffe807ea13c98e575dbe /deployments
parent28376cbc428324577451181f67f383ea9d8de164 (diff)
parentb3eb398fef49293156658e6f9e09a78eaca45c51 (diff)
Merge "Update building process"
Diffstat (limited to 'deployments')
-rwxr-xr-xdeployments/build.sh33
-rw-r--r--deployments/docker-compose.yml2
2 files changed, 15 insertions, 20 deletions
diff --git a/deployments/build.sh b/deployments/build.sh
index 7c2d7379..a88ebbc7 100755
--- a/deployments/build.sh
+++ b/deployments/build.sh
@@ -10,25 +10,20 @@
set -o nounset
set -o pipefail
-set -o xtrace
-function generate_binary {
- export GOPATH="$(pwd)/../"
- rm -f k8plugin
- rm -f *.so
- pushd ../src/k8splugin/
- dep ensure -v
- popd
- for plugin in deployment namespace service; do
- CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -buildmode=plugin -a -tags netgo -o ./$plugin.so ../src/k8splugin/plugins/$plugin/plugin.go
- done
- CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -tags netgo -o ./k8plugin ../src/k8splugin/cmd/main.go
-}
+k8s_path="$(git rev-parse --show-toplevel)"
-function build_image {
- echo "Start build docker image."
- docker-compose build --no-cache
-}
+echo "Compiling source code"
+pushd $k8s_path/src/k8splugin/
+make
+popd
-generate_binary
-build_image
+pushd $k8s_path/deployments
+for file in k8plugin *so; do
+ rm -f $file
+ mv $k8s_path/src/k8splugin/$file .
+done
+
+echo "Starting docker building process"
+docker-compose build --no-cache
+popd
diff --git a/deployments/docker-compose.yml b/deployments/docker-compose.yml
index 0d347b13..6ae7b4ea 100644
--- a/deployments/docker-compose.yml
+++ b/deployments/docker-compose.yml
@@ -9,7 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-version: '3'
+version: '2'
services:
multicloud-k8s: