[pitivi] .gitlab-ci.yml: Share certs with inner container.
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] .gitlab-ci.yml: Share certs with inner container.
- Date: Sun, 19 Jan 2020 20:58:46 +0000 (UTC)
commit 4888bb51f92eb4f6b05e4af9b72fce7dc635a492
Author: Brady J. Garvin <bgarvin cse unl edu>
Date: Sun Jan 19 08:43:11 2020 -0600
.gitlab-ci.yml: Share certs with inner container.
Recent commits to Pitivi have been failing CI because GitLab is unable
to establish a connection with TLS to the inner Docker instances in
Pitivi's Docker-in-Docker (dind) setup.
As described at https://hub.docker.com/_/docker#tls, TLS certificates
can be shared from the outer Docker instance to the inner instance to
ensure that the same certificates are used by both instances. The
process involves sharing the certificate folder (`-v
${DOCKER_TLS_CERTDIR}:${DOCKER_TLS_CERTDIR}:ro`) and setting an
environment variable to indicate where that shared folder is (`-e
DOCKER_TLS_CERTDIR=${DOCKER_TLS_CERTDIR}`).
As recommended by GitLab, this commit also specifies a version for the
`dind` service, so that developers can control when upgrades occur, and
similar changes to dind will not disrupt CI at inopportune times.
.gitlab-ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 59167b4c..2218e8f4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -58,7 +58,7 @@ deploy:
.build_emplate: &build_docker_image
image: docker:latest
services:
- - docker:dind
+ - docker:19.03.0-dind
script:
- export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}:${BRANCH}-sdk_3.34"
- export BASE_IMAGE="registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.34"
@@ -70,7 +70,7 @@ deploy:
- env
- - docker run --privileged --name ${TMPIMAGENAME} ${BASE_IMAGE} bash -c "${CLONE_PITIVI} &&
${BUILD_PITIVI} && rm -Rf ${BUILDDIR}"
+ - docker run --privileged --name ${TMPIMAGENAME} -e DOCKER_TLS_CERTDIR=${DOCKER_TLS_CERTDIR} -v
${DOCKER_TLS_CERTDIR}:${DOCKER_TLS_CERTDIR}:ro ${BASE_IMAGE} bash -c "${CLONE_PITIVI} && ${BUILD_PITIVI} &&
rm -Rf ${BUILDDIR}"
- docker commit ${TMPIMAGENAME} ${IMAGE}
- docker rm ${TMPIMAGENAME}
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]