1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2018 Huawei Technologies Co., Ltd.
8 Build software with unit tests
9 ------------------------------
13 cd $HOME/onap/workspace/SO/libs
15 $HOME/onap/apache-maven-3.3.9/bin/mvn -s $HOME/onap/.m2/settings.xml clean install
17 cd $HOME/onap/workspace/SO/so
19 $HOME/onap/apache-maven-3.3.9/bin/mvn -s $HOME/onap/.m2/settings.xml clean install
21 Build software without unit tests
22 ----------------------------------
26 cd $HOME/onap/workspace/SO/libs
28 $HOME/onap/apache-maven-3.3.9/bin/mvn -s $HOME/onap/.m2/settings.xml -DskipTests -Dmaven.test.skip=true clean install
30 cd $HOME/onap/workspace/SO/so
32 $HOME/onap/apache-maven-3.3.9/bin/mvn -s $HOME/onap/.m2/settings.xml -DskipTests -Dmaven.test.skip=true clean install
37 SO docker images are built using the "docker" maven profile.
39 During the build, the chef-repo and so-docker repositories are cloned from gerrit into the "so" directory structure. Extra definitions are required in the build environment to make this happen. You may need to adjust the definition of mso.chef.git.url.prefix to match the way you authenticate yourself when performing git clone --depth 1.
41 If you are behind a corporate firewall, you can specify proxy definitions for the constructed docker images.
43 **Remove existing docker containers and images**
47 docker stop $(docker ps -qa)
49 docker rm $(docker ps -aq)
51 docker rmi -f $(docker images -q)
53 **Build docker images (without proxy definition):**
57 cd $HOME/onap/workspace/SO/so/packages
59 $HOME/onap/apache-maven-3.3.9/bin/mvn -s $HOME/onap/.m2/settings.xml clean install -P docker
60 -Dmso.chef.git.url.prefix=ssh://$USER@gerrit.onap.org:29418 -Dmso.chef.git.branchname=master
61 -Dmso.chef.git.url.suffix.chef.repo=so/chef-repo -Dmso.chef.git.url.suffix.chef.config=so/so-config
62 -Ddocker.buildArg.http_proxy=http://one.proxy.att.com:8080
63 -Ddocker.buildArg.https_proxy=http://one.proxy.att.com:8080
65 **Build docker images (with proxy definition):**
69 cd $HOME/onap/workspace/SO/so/packages
71 $HOME/onap/apache-maven-3.3.9/bin/mvn -s $HOME/onap/.m2/settings.xml clean install -P docker
72 -Dmso.chef.git.url.prefix=ssh://$USER@gerrit.onap.org:29418 -Dmso.chef.git.branchname=master
73 -Dmso.chef.git.url.suffix.chef.repo=so/chef-repo -Dmso.chef.git.url.suffix.chef.config=so/so-config
74 -Ddocker.buildArg.http_proxy=http://proxyhost:port -Ddocker.buildArg.https_proxy=http://proxyhost:port
76 Build with Integration Tests
77 -----------------------------
79 This is done exactly as described for building docker images, except that the maven profile to use is "with-integration-tests" instead of "docker". Integration tests are executed inside docker containers constructed by the build.