Allow building containers from a gerrit change 21/46721/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Sun, 5 Nov 2017 14:13:35 +0000 (15:13 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sun, 5 Nov 2017 14:18:19 +0000 (15:18 +0100)
It leverages on git command instead of pip git support [1].
Otherwise it forces pip master which raises side effects in rally [2]

It is mandatory for implementing Functional testing gating [3]

[1] https://pip.pypa.io/en/stable/reference/pip_install/#git
[2] https://gerrit.opnfv.org/gerrit/#/c/40909/
[3] https://wiki.opnfv.org/display/functest/Functional+testing+gating

Change-Id: Ia18fee3e60fc08da9b96730ce85d5b7c866144aa
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/core/Dockerfile

index 91c0468..ffcbe38 100644 (file)
@@ -14,6 +14,8 @@ RUN apk --no-cache add --update \
     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ | \
         > upper-constraints.txt && \
     wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG | \
         sed -E s/^tempest==+\(.*\)$/-e\ git+https:\\/\\/github.com\\/openstack\\/tempest@\\1#egg=tempest/ | \
         > upper-constraints.txt && \
+    git clone https://gerrit.opnfv.org/gerrit/functest /src/functest && \
+    (cd /src/functest && git fetch origin $BRANCH && git checkout FETCH_HEAD) && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
         -e git+https://github.com/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
         -e git+https://github.com/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
@@ -26,8 +28,8 @@ RUN apk --no-cache add --update \
          /src/os-faults /src/rally && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
          /src/os-faults /src/rally && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
-        git+https://gerrit.opnfv.org/gerrit/functest@$BRANCH#egg=functest && \
-    rm -r upper-constraints.txt /src/os-faults/.git /src/rally/.git && \
+        /src/functest && \
+    rm -r upper-constraints.txt /src/functest /src/os-faults/.git /src/rally/.git && \
     mkdir -p /etc/rally && \
     printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
     mkdir -p /var/lib/rally/database && rally-manage db create && \
     mkdir -p /etc/rally && \
     printf "[database]\nconnection = 'sqlite:////var/lib/rally/database/rally.sqlite'" > /etc/rally/rally.conf && \
     mkdir -p /var/lib/rally/database && rally-manage db create && \