[pitivi/sdk] ci: Replace docker with podman
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/sdk] ci: Replace docker with podman
- Date: Sun, 6 Dec 2020 23:07:36 +0000 (UTC)
commit 46fb7745a41f4f80e1d2d84ffe0a90e7052b1914
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Dec 5 01:47:06 2020 +0100
ci: Replace docker with podman
Fixes #2492
.gitlab-ci.yml | 51 ++++++++++++++++++++++++---------------------------
1 file changed, 24 insertions(+), 27 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index da94bcc1a..db41a59ed 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,6 @@
---
stages:
- - docker_image
+ - tests_runner_image
- build
- deploy
@@ -12,33 +12,30 @@ variables:
pitivi:master:
- stage: docker_image
- tags:
- - privileged
- image: docker:latest
- variables:
- DOCKER_DRIVER: overlay2
- DOCKER_TLS_CERTDIR: ""
- services:
- - docker:19.03.0-dind
+ stage: tests_runner_image
+ image: registry.gitlab.gnome.org/infrastructure/docker/buildah:latest
script:
- # https://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash#2264537
- - export NAMESPACE="$(echo "${CI_PROJECT_NAMESPACE}" | tr A-Z a-z)"
- - export BRANCH=master
- - export IMAGE="${CI_REGISTRY}/${NAMESPACE}/${CI_PROJECT_NAME}:${BRANCH}-sdk_3.36"
- - export BASE_IMAGE="registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.36"
- - export TMPIMAGENAME="tmp-pitivi-${BRANCH}-sdk_3.36"
- - export BUILDDIR="\${HOME}/pitivi"
- - export CLONE_PITIVI="git clone ${CI_PROJECT_URL}.git --single-branch \${HOME}/pitivi -b
${CI_COMMIT_REF_NAME}"
- - export BUILD_PITIVI="flatpak-builder --user --disable-rofiles-fuse ${BUILDDIR}/app
${BUILDDIR}/build/flatpak/org.pitivi.Pitivi.json --state-dir=\${HOME}/flatpak-cache --ccache"
-
+ # https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
- env
- - docker run --privileged --name ${TMPIMAGENAME} ${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
- - docker push ${IMAGE}
+ # Create a container for building the sandbox.
+ - export BASE_IMAGE="registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.38"
+ - podman create --name sandbox_container ${BASE_IMAGE}
+ - podman start sandbox_container
+
+ # Build the Pitivi flatpak sandbox in the container.
+ - export DIR=/root/pitivi
+ - podman exec sandbox_container git clone ${CI_PROJECT_URL}.git --single-branch ${DIR} -b
${CI_COMMIT_REF_NAME}
+ - podman exec sandbox_container flatpak-builder --user --disable-rofiles-fuse ${DIR}/app
${DIR}/build/flatpak/org.pitivi.Pitivi.json --state-dir=\${HOME}/flatpak-cache --ccache
+ - podman exec sandbox_container rm -rf ${DIR}
+
+ # Turn the live container into a local image.
+ - export IMAGE="registry.gitlab.gnome.org/gnome/pitivi:master-sdk_3.38"
+ - podman commit sandbox_container ${IMAGE}
+
+ # Upload the image.
+ - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - podman push ${IMAGE}
only:
- triggers
- schedules
@@ -49,7 +46,7 @@ build:
stage: build
tags:
- flatpak
- image: registry.gitlab.gnome.org/gnome/pitivi:master-sdk_3.36
+ image: registry.gitlab.gnome.org/gnome/pitivi:master-sdk_3.38
variables:
BLACKLIST: >
-b tests.test_effects.EffectsPropertiesManagerTest.test_dependent_properties
@@ -100,4 +97,4 @@ deploy:
- flatpak build-commit-from --src-repo=flatpak_repo /srv/http --timestamp=NOW --gpg-sign=739E841A
only:
- master@GNOME/pitivi
- - thiblahute/sdk3.36@GNOME/pitivi
+ - thiblahute/sdk3.38@GNOME/pitivi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]