gplugin/builders

Parents 50f49327871c
Children 60b58ff3eeb6
Add a docs image and clean up the dist and scanbuild targets
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Dockerfile.docs Thu Jan 24 02:59:55 2019 -0600
@@ -0,0 +1,6 @@
+FROM gplugin/builders:debian-buster-amd64
+
+MAINTAINER Gary Kramlich <grim@reaperworld.com>
+
+COPY docs/build.sh /
+
--- a/convey.yml Thu Jan 24 02:34:36 2019 -0600
+++ b/convey.yml Thu Jan 24 02:59:55 2019 -0600
@@ -29,16 +29,6 @@
labels:
- COMMIT=${HG_COMMIT}
- dist:
- type: docker/build
- dockerfile: Dockerfile.dist
- tag: ${REPO}:dist
- files: dist
-
- dist-push:
- type: docker/push
- image: ${REPO}:dist
-
login:
type: docker/login
server: docker.io
@@ -59,15 +49,18 @@
type: docker/push
image: ${REPO}:pvs-studio
- scanbuild:
+ simple-build:
type: docker/build
- dockerfile: Dockerfile.scanbuild
- tag: ${REPO}:scanbuild
- files: scanbuild
+ dockerfile: Dockerfile.${TARGET}
+ tags: ${REPO}:${TARGET}
+ files:
+ - ${FILES}
+ labels:
+ - COMMIT=${HG_COMMIT}
- scanbuild-push:
+ simple-push:
type: docker/push
- image: ${REPO}:scanbuild
+ image: ${REPO}:${TARGET}
# stuff after this needs work yet
coverity:
@@ -127,13 +120,24 @@
- tasks: [import, build]
dist:
+ environment: [TARGET=dist, FILES=dist]
stages:
- - tasks: [import, dist]
+ - tasks: [import, simple-build]
dist-publish:
- environment: [DOCKERHUB_USERNAME, DOCKERHUB_PASSWORD]
+ environment: [DOCKERHUB_USERNAME, DOCKERHUB_PASSWORD, TARGET=dist]
+ stages:
+ - tasks: [login, simple-push]
+
+ docs:
+ environment: [TARGET=docs, FILES=docs]
stages:
- - tasks: [login, dist-push]
+ - tasks: [import, simple-build]
+
+ docs-publish:
+ environment: [DOCKERHUB_USERNAME, DOCKERHUB_PASSWORD, TARGET=docs]
+ stages:
+ - tasks: [login, simple-push]
fedora-28-amd64:
environment: [DISTRO=fedora, VERSION=28, FILES=rpm]
@@ -165,13 +169,14 @@
- tasks: [login, pvs-studio-push]
scanbuild:
+ environment: [TARGET=scanbuild, FILES=scanbuild]
stages:
- - tasks: [import, scanbuild]
+ - tasks: [import, simple-build]
scanbuild-publish:
- environment: [DOCKERHUB_USERNAME, DOCKERHUB_PASSWORD]
+ environment: [DOCKERHUB_USERNAME, DOCKERHUB_PASSWORD, TARGET=scanbuild]
stages:
- - tasks: [login, scanbuild-push]
+ - tasks: [login, simple-push]
ubuntu-bionic-amd64:
environment: [DISTRO=ubuntu, VERSION=bionic, FILES=debian]
@@ -229,6 +234,7 @@
- debian-stretch-amd64
- debian-buster-amd64
- dist
+ - docs
- fedora-28-amd64
- fedora-29-amd64
- opensuse-tumbleweed-amd64
--- a/dist/build.sh Thu Jan 24 02:34:36 2019 -0600
+++ b/dist/build.sh Thu Jan 24 02:59:55 2019 -0600
@@ -23,7 +23,7 @@
ninja -C ${BUILD_DIR} dist
EC=${?}
-cp -a ${BUILD_DIR}/meson-dist/* ${CONVEY_WORKSPACE}/dist
+cp -a ${BUILD_DIR}/meson-dist ${CONVEY_WORKSPACE}/dist
exit ${?}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/build.sh Thu Jan 24 02:59:55 2019 -0600
@@ -0,0 +1,31 @@
+#!/bin/sh -ex
+# Copyright (C) 2015-2019 Gary Kramlich <grim@reaperworld.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+cd ${CONVEY_WORKSPACE}
+
+BUILD_DIR="build-docs"
+
+meson ${BUILD_DIR}
+ninja -C ${BUILD_DIR} gplugin-doc gplugin-gtk-doc
+EC=${?}
+
+mkdir -p ${CONVEY_WORKSPACE}/docs
+cp -a ${BUILD_DIR}/gplugin/reference/html ${CONVEY_WORKSPACE}/docs/gplugin
+cp -a ${BUILD_DIR}/gplugin-gtk/reference/html ${CONVEY_WORKSPACE}/docs/gplugin-gtk
+
+exit ${?}
+