From nobody Sat May 4 14:11:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588269960; cv=none; d=zohomail.com; s=zohoarc; b=T6qlBt3jnpdQoILJZnVSDYMBb77pKrbaJDGhkvcWCvmYlFNwiIJvkqx70inOu+7Ixs6jvVZsLsO2z+eoHDNQBD89paDCaJBqlm1KUGO7B5YUUgoudy/DFmqiuqcY4FCdDHrS9TD6UbRVNaGXiYJeoyqUnkGWhjM7qomGNT46oK8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588269960; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=gJaSQf6CI/GEaY2QUG2c5fTOTIXCxYXMGYXG/fKry9g=; b=Z/QYs05IyJ7xMi3uh7Yr9Wk4iU3Vy+qwthTxd3vixMx+wGoHzEXbsf6wuFwTG3IIiQyQrKOumsgqF5RB9tbRlp8buUvvLD15WiPF4Jotdr8g53dkMvHeuLw96HZBqGpVngEqQS/AdVDXVo6BTGxP+VVThxeLuOhijr7K6qACP60= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1588269960512633.3531150721765; Thu, 30 Apr 2020 11:06:00 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-341-s0mZJyC0NHGlrIQ4FNXfOQ-1; Thu, 30 Apr 2020 14:05:56 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A7619107ACF5; Thu, 30 Apr 2020 18:05:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E25F5D9F1; Thu, 30 Apr 2020 18:05:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4ED2E4CAA0; Thu, 30 Apr 2020 18:05:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03UI5jAp015436 for ; Thu, 30 Apr 2020 14:05:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4CC906A947; Thu, 30 Apr 2020 18:05:45 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66AF66607E; Thu, 30 Apr 2020 18:05:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588269959; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=gJaSQf6CI/GEaY2QUG2c5fTOTIXCxYXMGYXG/fKry9g=; b=Rxu4+R0rd6fuPm/Nv43JnfFdutMRozgRAPxSQes75SOZBO4eLqMV1np9+nsUcScXLKDrk7 KULYWTCsBkKt9etiTyR7Q2s/PPj3ZGeRI3EUj+yCOUQBRVZaTgerymWG2XAadYy5aBdokQ I16YY5pZ7EVjDFrM64SDRi309ikOaXc= X-MC-Unique: s0mZJyC0NHGlrIQ4FNXfOQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt-appdev-guide-python PATCH] gitlab: introduce CI jobs for building content Date: Thu, 30 Apr 2020 19:05:38 +0100 Message-Id: <20200430180538.2202667-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This generates the HTML docs using publican and publishes the result as an artifact which are then browseable online via GitLab pages. Signed-off-by: Daniel P. Berrang=C3=A9 --- .gitlab-ci.yml | 40 ++++++++++++++++++++++++++ Makefile | 7 +++-- ci/libvirt-fedora-32.Dockerfile | 50 +++++++++++++++++++++++++++++++++ ci/refresh | 17 +++++++++++ 4 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 ci/libvirt-fedora-32.Dockerfile create mode 100755 ci/refresh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50dae92..0e48e12 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,34 @@ =20 stages: - prebuild + - containers + - docs + +.container_job_template: &container_job_definition + image: docker:stable + stage: containers + services: + - docker:dind + before_script: + - export TAG=3D"$CI_REGISTRY_IMAGE/ci-$NAME:latest" + - export COMMON_TAG=3D"$CI_REGISTRY/libvirt/libvirt-perl/ci-$NAME:late= st" + - docker info + - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGI= STRY_PASSWORD" + script: + - docker pull "$TAG" || docker pull "$COMMON_TAG" || true + - docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$= TAG" -f "ci/libvirt-$NAME.Dockerfile" ci + - docker push "$TAG" + after_script: + - docker logout + +.docs_job_template: &docs_job_definition + stage: docs + before_script: + - export MAKEFLAGS=3D"-j$(getconf _NPROCESSORS_ONLN)" + script: + - git clone --depth 1 https://gitlab.com/libvirt/libvirt-publican.git = brand + - $MAKE branddir=3D$PWD/brand + - mv tmp/en-US/html public =20 # Check that all commits are signed-off for the DCO. # Skip on "libvirt" namespace, since we only need to run @@ -14,3 +42,15 @@ check-dco: except: variables: - $CI_PROJECT_NAMESPACE =3D=3D 'libvirt' + +fedora-32-container: + <<: *container_job_definition + variables: + NAME: fedora-32 + +pages: + <<: *docs_job_definition + image: $CI_REGISTRY_IMAGE/ci-fedora-32:latest + artifacts: + paths: + - public diff --git a/Makefile b/Makefile index 85935a1..237961a 100644 --- a/Makefile +++ b/Makefile @@ -3,17 +3,18 @@ prefix=3D/usr datadir=3D$(prefix)/share pkgdatadir=3D$(datadir)/publican contentdir=3D$(pkgdatadir)/Common_Content +branddir=3D$(contentdir) =20 all: html pdf =20 html: - publican build --langs=3Den-US --formats=3Dhtml --common_content=3D$(cont= entdir) + publican build --langs=3Den-US --formats=3Dhtml --common_content=3D$(cont= entdir) --brand_dir=3D$(branddir) =20 pdf: - publican build --langs=3Den-US --formats=3Dpdf --common_content=3D$(conte= ntdir) + publican build --langs=3Den-US --formats=3Dpdf --common_content=3D$(conte= ntdir) --brand_dir=3D$(branddir) =20 rpm: - publican package --lang=3Den-US --binary --desktop --common_content=3D$(c= ontentdir) + publican package --lang=3Den-US --binary --desktop --common_content=3D$(c= ontentdir) --brand_dir=3D$(branddir) =20 clean: publican clean --common_content=3D$(contentdir) diff --git a/ci/libvirt-fedora-32.Dockerfile b/ci/libvirt-fedora-32.Dockerf= ile new file mode 100644 index 0000000..8539d7d --- /dev/null +++ b/ci/libvirt-fedora-32.Dockerfile @@ -0,0 +1,50 @@ +FROM fedora:32 + +RUN dnf update -y && \ + dnf install -y \ + autoconf \ + automake \ + bash \ + bash-completion \ + ca-certificates \ + ccache \ + chrony \ + cppi \ + gcc \ + gdb \ + gettext \ + gettext-devel \ + git \ + glibc-devel \ + glibc-langpack-en \ + libtool \ + lsof \ + make \ + meson \ + net-tools \ + ninja-build \ + patch \ + perl \ + pkgconfig \ + publican \ + python3 \ + python3-setuptools \ + python3-wheel \ + rpm-build \ + screen \ + strace \ + sudo \ + vim && \ + dnf autoremove -y && \ + dnf clean all -y && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin= /gcc) + +ENV LANG "en_US.UTF-8" + +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" + +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" diff --git a/ci/refresh b/ci/refresh new file mode 100755 index 0000000..ce0c20a --- /dev/null +++ b/ci/refresh @@ -0,0 +1,17 @@ +#!/bin/sh + +if test -z "$1" +then + echo "syntax: $0 PATH-TO-LCITOOL" + exit 1 +fi + +LCITOOL=3D$1 + +if ! test -x "$LCITOOL" +then + echo "$LCITOOL is not executable" + exit 1 +fi + +$LCITOOL dockerfile libvirt-fedora-32 libvirt-publican > libvirt-fedora-32= .Dockerfile --=20 2.25.4