[perl PATCH v4 2/3] gitlab: add a simple job that publishes the API docs as HTML

Daniel P. Berrangé posted 3 patches 5 years, 9 months ago
[perl PATCH v4 2/3] gitlab: add a simple job that publishes the API docs as HTML
Posted by Daniel P. Berrangé 5 years, 9 months ago
The Perl modules have inline POD docs. This can be converted to HTML and
published as a GitLab artifact. The rendered HTML is kind of ugly but
improving this is left as an exercise for the future.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 586434e..1099e2b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,7 @@ stages:
   - prebuild
   - containers
   - builds
+  - docs
 
 .container_job_template: &container_job_definition
   image: docker:stable
@@ -169,3 +170,17 @@ ubuntu-2004-git-build:
   <<: *git_build_job_definition
   variables:
     NAME: ubuntu-2004
+
+apiref:
+  stage: docs
+  image: perl
+  script:
+    - mkdir apiref
+    - perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go  lib apiref
+  artifacts:
+    expose_as: 'API Reference'
+    name: 'apiref'
+    when: on_success
+    expire_in: 30 days
+    paths:
+      - apiref
-- 
2.26.2

Re: [perl PATCH v4 2/3] gitlab: add a simple job that publishes the API docs as HTML
Posted by Andrea Bolognani 5 years, 9 months ago
On Tue, 2020-05-05 at 12:40 +0100, Daniel P. Berrangé wrote:
> +++ b/.gitlab-ci.yml
> @@ -3,6 +3,7 @@ stages:
> +apiref:
> +  stage: docs
> +  image: perl

Why are we using a third-party image instead of the CentOS 8 based
image that we have built specifically for libvirt-perl earlier?

> +  script:
> +    - mkdir apiref
> +    - perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go  lib apiref

Extra whitespace here.

-- 
Andrea Bolognani / Red Hat / Virtualization

Re: [perl PATCH v4 2/3] gitlab: add a simple job that publishes the API docs as HTML
Posted by Daniel P. Berrangé 5 years, 9 months ago
On Thu, May 07, 2020 at 12:11:44PM +0200, Andrea Bolognani wrote:
> On Tue, 2020-05-05 at 12:40 +0100, Daniel P. Berrangé wrote:
> > +++ b/.gitlab-ci.yml
> > @@ -3,6 +3,7 @@ stages:
> > +apiref:
> > +  stage: docs
> > +  image: perl
> 
> Why are we using a third-party image instead of the CentOS 8 based
> image that we have built specifically for libvirt-perl earlier?

Left over from when I was trying to build everything against generic
perl images.

> 
> > +  script:
> > +    - mkdir apiref
> > +    - perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go  lib apiref
> 
> Extra whitespace here.
> 
> -- 
> Andrea Bolognani / Red Hat / Virtualization
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|