Skip to content

Build contrail test ci container

Harish Kumar edited this page Jun 14, 2016 · 2 revisions

Build the container

There is a script (install.sh) which build docker containers for both contrail-test-ci.

    $ ./install.sh docker-build -h

    Build contrail-test-ci docker container

    Usage: ./install.sh docker-build [OPTIONS] (contrail-test|contrail-test-ci)

      -h|--help                     Print help message
      --test-repo REPO                Contrail-test git repo, Default: github.com/juniper/contrail-test-ci.git
      --test-ref REF                  Contrail-test git reference - commit id, branch, tag, Default: master
      --fab-repo FAB_REPO           Contrail-fabric-utils git repo
      --fab-ref FAB_REF             Contrail-fabric-utils git reference (commit id, branch, or tag), Default: master
      --ci-repo CI_REPO	            Contrail-test-ci git repo, Default: github.com/juniper/contrail-test.git
      --ci-ref CI_REF               Contrail-test-ci reference (commit id, branch, or tag), Default: master
      --container-tag CONTAINER_TAG Docker container tag, default to contrail-test-ci-<openstack-release>:<contrail-version>
                                        openstack-release and contrail-version is extracted from contrail-install-package name
                                        e.g contrail-test-ci-juno:2.21-105
      --test-artifact ARTIFACT        Contrail test tar file - this tar file will be used instead of git source in case provided
      --ci-artifact CI_ARTICACT     Contrail test ci tar file
      --fab-artifact FAB_ARTIFACT   Contrail-fabric-utils tar file
      -u|--package-url PACKAGE_URL  Contrail-install-packages deb package web url (http:// or https://) or scp path
                                    (ssh://<server ip/name/< package path>), if url is provided, the
                                    package will be installed and setup local repo.
                                    In case of scp, user name and password will be read from environment variables
                                    SSHUSER - user name to be used during scp
                                    SSHPASS - user password to be used during scp
      -c|--use-cache                Use docker cache for the build
      -e|--export EXPORT_PATH       Export Container image to the path provided

      positional arguments
        Type of build               What to build, valid options are contrail-test, contrail-test-ci

     Example:

      $ ./install.sh docker-build --ci-repo https://github.com/juniper/contrail-test-ci -e /tmp/export2
            -u http://nodei16/contrail-install-packages_2.21-105~juno_all.deb contrail-test-ci

      $ export SSHUSER=user1 SSHPASS=password
      $ ./install.sh docker-build --ci-repo https://github.com/juniper/contrail-test-ci -e /tmp/export2 -u ssh://nodei16/var/cache/artifacts/contrail-install-packages_2.21-105~juno_all.deb contrail-test-ci
  • Docker build with artifacts
 $ ./install.sh docker-build -c --ci-artifact /tmp/contrail-test-ci.tar.gz \
        -u http://nodei16/contrail-install-packages_2.21-105~juno_all.deb \
        --fab-artifact /tmp/contrail-fabric-utils.tar.gz contrail-test-ci
  • Build and export to /export/docker/contrail-test-ci/
  ./install.sh docker-build --ci-artifact /tmp/contrail-test-ci.tar.gz \
        -u http://nodei16/contrail-install-packages_2.21-105~juno_all.deb \
        --fab-artifact /tmp/contrail-fabric-utils.tar.gz contrail-test-ci -e /export/docker/contrail-test-ci/