From 5448462d7aa342c752196bb8ac17598d98a32088 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Mon, 3 Sep 2018 21:37:28 +0200 Subject: Avoid cloning repos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docker/benchmarking/Dockerfile | 6 ++++-- docker/core/Dockerfile | 6 ++++-- docker/features/Dockerfile | 5 ++++- docker/healthcheck/Dockerfile | 6 ++++-- docker/smoke/Dockerfile | 18 ++++++++++++------ docker/tempest/Dockerfile | 18 ++++++++++++------ docker/vnf/Dockerfile | 36 ++++++++++++++++++++++++------------ 7 files changed, 64 insertions(+), 31 deletions(-) (limited to 'docker') diff --git a/docker/benchmarking/Dockerfile b/docker/benchmarking/Dockerfile index 3afa5c483..7b98eade9 100644 --- a/docker/benchmarking/Dockerfile +++ b/docker/benchmarking/Dockerfile @@ -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 && \ diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile index 8f744db67..c1e7ede03 100644 --- a/docker/core/Dockerfile +++ b/docker/core/Dockerfile @@ -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 \ diff --git a/docker/features/Dockerfile b/docker/features/Dockerfile index 7024f9634..99de1eda5 100644 --- a/docker/features/Dockerfile +++ b/docker/features/Dockerfile @@ -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 && \ diff --git a/docker/healthcheck/Dockerfile b/docker/healthcheck/Dockerfile index ccb61abf9..4a1c255b3 100644 --- a/docker/healthcheck/Dockerfile +++ b/docker/healthcheck/Dockerfile @@ -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 diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile index 58d096108..c405330a6 100644 --- a/docker/smoke/Dockerfile +++ b/docker/smoke/Dockerfile @@ -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 \ diff --git a/docker/tempest/Dockerfile b/docker/tempest/Dockerfile index d53457913..0cc947939 100644 --- a/docker/tempest/Dockerfile +++ b/docker/tempest/Dockerfile @@ -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 && \ diff --git a/docker/vnf/Dockerfile b/docker/vnf/Dockerfile index dfa520169..d081ff17f 100644 --- a/docker/vnf/Dockerfile +++ b/docker/vnf/Dockerfile @@ -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 && \ -- cgit 1.2.3-korg