Switch to git clone for requirements

This is needed for doing Depends-On changes to openstack/requirements.

Additionally, it removes the last github call in the LOCI!

Change-Id: Ib5bb66f53ebaa0a961dbf0908404d8f705d6cc23
This commit is contained in:
Sam Yaple 2017-04-05 01:36:13 +00:00
parent cbe1ba4258
commit 5a601c9490
3 changed files with 21 additions and 6 deletions

View File

@ -1,5 +1,8 @@
FROM centos:7
ENV PROJECT=requirements
ARG PROJECT_REPO=https://git.openstack.org/openstack/${PROJECT}
ARG PROJECT_REF=master
ARG OVERRIDE=override
ADD $OVERRIDE /
@ -45,8 +48,10 @@ RUN set -x \
&& python get-pip.py \
&& rm get-pip.py \
&& mkdir /root/packages \
&& curl -sSL https://raw.githubusercontent.com/openstack/requirements/master/global-requirements.txt > /root/packages/global-requirements.txt \
&& curl -sSL https://raw.githubusercontent.com/openstack/requirements/master/upper-constraints.txt > /root/packages/upper-constraints.txt \
&& git init /tmp/requirements \
&& git --git-dir /tmp/requirements/.git fetch --depth 1 $PROJECT_REPO $PROJECT_REF \
&& git --work-tree /tmp/requirements --git-dir /tmp/requirements/.git checkout FETCH_HEAD \
&& mv /tmp/requirements/global-requirements.txt /tmp/requirements/upper-constraints.txt /root/packages/ \
# NOTE(SamYaple): There is a bug with python-nss, this is a workaround. https://bugzilla.redhat.com/show_bug.cgi?id=1389739
&& sed -i '/dogtag-pki/d' /root/packages/global-requirements.txt \
&& pip download -d /tmp -c /root/packages/upper-constraints.txt python-nss \

9
debian/Dockerfile vendored
View File

@ -1,5 +1,8 @@
FROM debian:jessie
ENV PROJECT=requirements
ARG PROJECT_REPO=https://git.openstack.org/openstack/${PROJECT}
ARG PROJECT_REF=master
ARG OVERRIDE=override
ADD $OVERRIDE /
@ -31,8 +34,10 @@ RUN set -x \
&& python get-pip.py \
&& rm get-pip.py \
&& mkdir /root/packages \
&& curl -sSL https://raw.githubusercontent.com/openstack/requirements/master/global-requirements.txt > /root/packages/global-requirements.txt \
&& curl -sSL https://raw.githubusercontent.com/openstack/requirements/master/upper-constraints.txt > /root/packages/upper-constraints.txt \
&& git init /tmp/requirements \
&& git --git-dir /tmp/requirements/.git fetch --depth 1 $PROJECT_REPO $PROJECT_REF \
&& git --work-tree /tmp/requirements --git-dir /tmp/requirements/.git checkout FETCH_HEAD \
&& mv /tmp/requirements/global-requirements.txt /tmp/requirements/upper-constraints.txt /root/packages/ \
# NOTE(SamYaple): There is a bug with python-nss, this is a workaround. https://bugzilla.redhat.com/show_bug.cgi?id=1389739
&& sed -i '/dogtag-pki/d' /root/packages/global-requirements.txt \
&& pip download -d /tmp -c /root/packages/upper-constraints.txt python-nss \

View File

@ -1,5 +1,8 @@
FROM ubuntu:xenial
ENV PROJECT=requirements
ARG PROJECT_REPO=https://git.openstack.org/openstack/${PROJECT}
ARG PROJECT_REF=master
ARG OVERRIDE=override
ADD $OVERRIDE /
@ -31,8 +34,10 @@ RUN set -x \
&& python get-pip.py \
&& rm get-pip.py \
&& mkdir /root/packages \
&& curl -sSL https://raw.githubusercontent.com/openstack/requirements/master/global-requirements.txt > /root/packages/global-requirements.txt \
&& curl -sSL https://raw.githubusercontent.com/openstack/requirements/master/upper-constraints.txt > /root/packages/upper-constraints.txt \
&& git init /tmp/requirements \
&& git --git-dir /tmp/requirements/.git fetch --depth 1 $PROJECT_REPO $PROJECT_REF \
&& git --work-tree /tmp/requirements --git-dir /tmp/requirements/.git checkout FETCH_HEAD \
&& mv /tmp/requirements/global-requirements.txt /tmp/requirements/upper-constraints.txt /root/packages/ \
# NOTE(SamYaple): There is a bug with python-nss, this is a workaround. https://bugzilla.redhat.com/show_bug.cgi?id=1389739
&& sed -i '/dogtag-pki/d' /root/packages/global-requirements.txt \
&& pip download -d /tmp -c /root/packages/upper-constraints.txt python-nss \