Avoid cloning repos 83/61783/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Mon, 3 Sep 2018 19:37:28 +0000 (21:37 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 3 Sep 2018 19:37:28 +0000 (21:37 +0200)
It inits the repos and fetch the required tags/ids/branches.
All tags are fetched to meet pbr requirements.

Change-Id: I0accd8ad04b93d63857e301dea11af69e0edf957
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/benchmarking/Dockerfile
docker/core/Dockerfile
docker/features/Dockerfile
docker/healthcheck/Dockerfile
docker/smoke/Dockerfile
docker/tempest/Dockerfile
docker/vnf/Dockerfile

index 3afa5c4..7b98ead 100644 (file)
@@ -13,8 +13,10 @@ RUN apk --no-cache add --update libxml2 libxslt && \
         > upper-constraints.txt && \
     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH | \
         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
-    git clone https://git.openstack.org/openstack/vmtp.git /src/vmtp && \
-    (cd /src/vmtp && git fetch origin --tags $VMTP_TAG && git checkout FETCH_HEAD) && \
+    git init /src/vmtp && \
+    (cd /src/vmtp && \
+        git fetch --tags https://git.openstack.org/openstack/vmtp.git $VMTP_TAG && \
+        git checkout FETCH_HEAD) && \
     update-requirements -s --source /src/openstack-requirements /src/vmtp/ && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
         /src/vmtp && \
index 8f744db..c1e7ede 100644 (file)
@@ -18,8 +18,10 @@ RUN apk --no-cache add --update \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG \
         -e git+https://git.openstack.org/openstack/requirements@$OPENSTACK_TAG#egg=openstack_requirements && \
-    git clone --depth 1 https://gerrit.opnfv.org/gerrit/functest /src/functest && \
-    (cd /src/functest && git fetch --depth 1 --tags origin $BRANCH && git checkout FETCH_HEAD) && \
+    git init /src/functest && \
+    (cd /src/functest && \
+        git fetch --tags https://gerrit.opnfv.org/gerrit/functest $BRANCH && \
+        git checkout FETCH_HEAD) && \
     update-requirements -s --source /src/openstack-requirements /src/functest && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=$OPENSTACK_TAG \
index 7024f96..99de1ed 100644 (file)
@@ -14,7 +14,10 @@ RUN apk --no-cache add --update python3 sshpass && \
         > upper-constraints.txt && \
     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH | \
         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
-    git clone --depth 1 -b $FDS_TAG https://gerrit.opnfv.org/gerrit/fds /src/fds && \
+    git init /src/fds && \
+    (cd /src/fds && \
+        git fetch --tags https://gerrit.opnfv.org/gerrit/fds $FDS_TAG && \
+        git checkout FETCH_HEAD) && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt \
         -cupper-constraints.opnfv.txt \
         -rthirdparty-requirements.txt && \
index ccb61ab..4a1c255 100644 (file)
@@ -12,8 +12,10 @@ RUN wget -q -O- https://git.openstack.org/cgit/openstack/requirements/plain/uppe
         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
         -rthirdparty-requirements.txt && \
-    git clone --depth 1 https://git.opendaylight.org/gerrit/p/integration/test.git /src/odl_test && \
-    (cd /src/odl_test && git fetch --depth 1 --tags origin $ODL_TAG && git checkout FETCH_HEAD) && \
+    git init /src/odl_test && \
+    (cd /src/odl_test && \
+        git fetch --tags https://git.opendaylight.org/gerrit/p/integration/test.git $ODL_TAG && \
+        git checkout FETCH_HEAD) && \
     rm -r /src/odl_test/.git thirdparty-requirements.txt upper-constraints.txt \
         upper-constraints.opnfv.txt
 COPY testcases.yaml /usr/lib/python2.7/site-packages/xtesting/ci/testcases.yaml
index 58d0961..c405330 100644 (file)
@@ -15,14 +15,20 @@ RUN apk --no-cache add --virtual .build-deps --update \
         > upper-constraints.txt && \
     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH | \
         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
-    git clone --depth 1 https://git.openstack.org/openstack/patrole.git /src/patrole && \
-    (cd /src/patrole && git fetch --tags origin $PATROLE_TAG && git checkout FETCH_HEAD) && \
+    git init /src/patrole && \
+    (cd /src/patrole && \
+        git fetch --tags https://git.openstack.org/openstack/patrole.git $PATROLE_TAG && \
+        git checkout FETCH_HEAD) && \
     update-requirements -s --source /src/openstack-requirements /src/patrole/ && \
-    git clone https://git.openstack.org/openstack/neutron-tempest-plugin.git /src/neutron-tempest-plugin && \
-    (cd /src/neutron-tempest-plugin && git fetch --tags origin $NEUTRON_TAG && git checkout FETCH_HEAD) && \
+    git init /src/neutron-tempest-plugin && \
+    (cd /src/neutron-tempest-plugin && \
+        git fetch --tags https://git.openstack.org/openstack/neutron-tempest-plugin.git $NEUTRON_TAG && \
+        git checkout FETCH_HEAD) && \
     update-requirements -s --source /src/openstack-requirements /src/neutron-tempest-plugin && \
-    git clone https://git.openstack.org/openstack/barbican-tempest-plugin.git /src/barbican-tempest-plugin && \
-    (cd /src/barbican-tempest-plugin && git fetch --tags origin $BARBICAN_TAG && git checkout FETCH_HEAD) && \
+    git init /src/barbican-tempest-plugin && \
+    (cd /src/barbican-tempest-plugin && \
+        git fetch --tags https://git.openstack.org/openstack/barbican-tempest-plugin.git $BARBICAN_TAG && \
+        git checkout FETCH_HEAD) && \
     update-requirements -s --source /src/openstack-requirements /src/barbican-tempest-plugin/ && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
         /src/patrole /src/barbican-tempest-plugin /src/neutron-tempest-plugin \
index d534579..0cc9479 100644 (file)
@@ -21,14 +21,20 @@ RUN apk --no-cache add --virtual .build-deps --update \
     esac && \
     wget -q -O- https://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH | \
         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
-    git clone --depth 1 https://git.openstack.org/openstack/os-faults.git /src/os-faults && \
-    (cd /src/os-faults && git fetch --depth 1 --tags origin $OS_FAULTS_TAG && git checkout FETCH_HEAD) && \
+    git init /src/os-faults && \
+    (cd /src/os-faults && \
+        git fetch --tags https://git.openstack.org/openstack/os-faults.git $OS_FAULTS_TAG && \
+        git checkout FETCH_HEAD) && \
     update-requirements -s --source /src/openstack-requirements /src/os-faults/ && \
-    git clone --depth 1 https://git.openstack.org/openstack/rally.git /src/rally && \
-    (cd /src/rally && git fetch --depth 1 --tags origin $RALLY_TAG && git checkout FETCH_HEAD) && \
+    git init /src/rally && \
+    (cd /src/rally && \
+        git fetch --tags https://git.openstack.org/openstack/rally.git $RALLY_TAG && \
+        git checkout FETCH_HEAD) && \
     update-requirements -s --source /src/openstack-requirements /src/rally/ && \
-    git clone --depth 1 https://git.openstack.org/openstack/rally-openstack.git /src/rally-openstack && \
-    (cd /src/rally-openstack && git fetch --depth 1 --tags origin $RALLY_OPENSTACK_TAG && git checkout FETCH_HEAD) && \
+    git init /src/rally-openstack && \
+    (cd /src/rally-openstack && \
+        git fetch --tags https://git.openstack.org/openstack/rally-openstack.git $RALLY_OPENSTACK_TAG && \
+        git checkout FETCH_HEAD) && \
     update-requirements -s --source /src/openstack-requirements /src/rally-openstack && \
     pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
         tempest /src/rally-openstack /src/os-faults && \
index dfa5201..d081ff1 100644 (file)
@@ -27,18 +27,30 @@ RUN apk --no-cache add --update \
         sed -E /#egg=functest/d > upper-constraints.opnfv.txt && \
     git clone --depth 1 -b $VIMS_TEST_TAG https://github.com/Metaswitch/clearwater-live-test /src/vims-test && \
     sed -i s/unf_ext\ \(.*\)/unf_ext\ \(0.0.7.4\)/g /src/vims-test/Gemfile.lock && \
-    git clone https://github.com/Metaswitch/quaff /src/vims-test/quaff && \
-    (cd /src/vims-test/quaff && git checkout $QUAFF_TAG) && \
-    git clone --depth 1 https://github.com/Metaswitch/clearwater-build-infra /src/vims-test/build-infra && \
-    (cd /src/vims-test/build-infra && git fetch --depth 1 --tags origin $VIMS_TEST_TAG && git checkout FETCH_HEAD) && \
-    git clone --depth 1 https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater.git /src/cloudify_vims && \
-    (cd /src/cloudify_vims && git fetch --depth 1 --tags origin $CLOUDIFY_VIMS_TAG && git checkout FETCH_HEAD) && \
-    git clone --depth 1 https://github.com/Metaswitch/clearwater-heat.git /src/heat_vims && \
-    (cd /src/heat_vims && git fetch --depth 1 --tags origin $HEAT_VIMS_TAG && git checkout FETCH_HEAD) && \
-    git clone --depth 1 -b $VROUTER_TAG https://github.com/oolorg/opnfv-vnf-vyos-blueprint.git /src/opnfv-vnf-vyos-blueprint && \
-    (cd /src/opnfv-vnf-vyos-blueprint && git fetch --depth 1 --tags origin $VROUTER_TAG && git checkout FETCH_HEAD) && \
-    git clone --depth 1 https://github.com/RebacaInc/abot_charm.git /src/epc-requirements/abot_charm && \
-    (cd /src/epc-requirements/abot_charm && git fetch --depth 1 --tags origin $ABOT_CHARM && git checkout FETCH_HEAD) && \
+    git init /src/vims-test/quaff && \
+    (cd /src/vims-test/quaff && \
+        git fetch --tags https://github.com/Metaswitch/quaff $QUAFF_TAG && \
+        git checkout FETCH_HEAD) && \
+    git init /src/vims-test/build-infra && \
+    (cd /src/vims-test/build-infra && \
+        git fetch --tags https://github.com/Metaswitch/clearwater-build-infra $VIMS_TEST_TAG && \
+        git checkout FETCH_HEAD) && \
+    git init /src/cloudify_vims && \
+    (cd /src/cloudify_vims && \
+        git fetch --tags https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater.git $CLOUDIFY_VIMS_TAG && \
+        git checkout FETCH_HEAD) && \
+    git init  /src/heat_vims && \
+    (cd /src/heat_vims && \
+        git fetch --tags https://github.com/Metaswitch/clearwater-heat.git $HEAT_VIMS_TAG && \
+        git checkout FETCH_HEAD) && \
+    git init /src/opnfv-vnf-vyos-blueprint && \
+    (cd /src/opnfv-vnf-vyos-blueprint && \
+        git fetch --tags https://github.com/oolorg/opnfv-vnf-vyos-blueprint.git $VROUTER_TAG && \
+        git checkout FETCH_HEAD) && \
+    git init /src/epc-requirements/abot_charm && \
+    (cd /src/epc-requirements/abot_charm && \
+        git fetch --tags https://github.com/RebacaInc/abot_charm.git $ABOT_CHARM && \
+        git checkout FETCH_HEAD) && \
     python3 -m pip install --no-cache-dir --src /src -cupper-constraints.txt -cupper-constraints.opnfv.txt \
         juju-wait==$JUJU_WAIT_TAG && \
     go get github.com/rogpeppe/godeps && \