ci: Allow the user to choose the mesa repository

Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Elie Tournier 6 years ago
parent faf23ce917
commit d1758cc09e
  1. 11
      ci/.gitlab-ci.yml
  2. 9
      ci/Dockerfile

@ -25,20 +25,13 @@ build docker image:
script: script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- time docker pull $CI_REGISTRY_IMAGE:latest || true - time docker pull $CI_REGISTRY_IMAGE:latest || true
- echo $MESA_COMMIT
- if [[ -n "$MESA_COMMIT" ]]; then - docker build
time docker build
--build-arg KNOWN_GOOD_MESA=$MESA_COMMIT --build-arg KNOWN_GOOD_MESA=$MESA_COMMIT
--build-arg MESA_REPO=$MESA_REPO
-t $CI_REGISTRY_IMAGE -t $CI_REGISTRY_IMAGE
--cache-from $CI_REGISTRY_IMAGE:latest ci --cache-from $CI_REGISTRY_IMAGE:latest ci
2>&1 | tee results/docker_build_log.txt; 2>&1 | tee results/docker_build_log.txt;
else
time docker build
-t $CI_REGISTRY_IMAGE
--cache-from $CI_REGISTRY_IMAGE:latest ci
2>&1 | tee results/docker_build_log.txt;
fi
- docker history $CI_REGISTRY_IMAGE:latest - docker history $CI_REGISTRY_IMAGE:latest

@ -162,9 +162,14 @@ RUN git clone --shallow-since="$GIT_DATE" https://gitlab.freedesktop.org/mesa/dr
rm -rf /drm rm -rf /drm
WORKDIR / WORKDIR /
ARG KNOWN_GOOD_MESA=3bccf702118dda542da3b96990fd0bcca97f9a89 ARG KNOWN_GOOD_MESA
ENV KNOWN_GOOD_MESA ${KNOWN_GOOD_MESA:-3bccf702118dda542da3b96990fd0bcca97f9a89}
RUN echo $KNOWN_GOOD_MESA
ARG MESA_REPO
ENV MESA_REPO ${MESA_REPO:-https://gitlab.freedesktop.org/mesa/mesa.git}
RUN echo $MESA_REPO
WORKDIR /mesa WORKDIR /mesa
RUN git clone --shallow-since="$GIT_DATE" https://gitlab.freedesktop.org/mesa/mesa.git . && \ RUN git clone --shallow-since="$GIT_DATE" ${MESA_REPO} . && \
git checkout ${KNOWN_GOOD_MESA} && \ git checkout ${KNOWN_GOOD_MESA} && \
git log --oneline -n 1 && \ git log --oneline -n 1 && \
mkdir -p build && \ mkdir -p build && \

Loading…
Cancel
Save