[libvirt-go-xml PATCH 1/2] gitlab: add CI definition for GitLab

Daniel P. Berrangé posted 2 patches 5 years, 10 months ago
[libvirt-go-xml PATCH 1/2] gitlab: add CI definition for GitLab
Posted by Daniel P. Berrangé 5 years, 10 months ago
We want to test against a variety of Go versions to validate that there
are not any incompatibilities in XML parser handling between versions.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.yml | 25 +++++++++++++++++++++++++
 README.md      |  2 +-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..f19d240
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,25 @@
+
+.go_build: &go_build
+  script:
+    - go test -timeout 10m -tags xmlroundtrip -v
+
+
+go_1_10:
+  <<: *go_build
+  image: golang:1.10
+
+go_1_11:
+  <<: *go_build
+  image: golang:1.11
+
+go_1_12:
+  <<: *go_build
+  image: golang:1.12
+
+go_1_13:
+  <<: *go_build
+  image: golang:1.13
+
+go_1_14:
+  <<: *go_build
+  image: golang:1.14
diff --git a/README.md b/README.md
index fcc1ffb..9e39190 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# libvirt-go-xml [![Build Status](https://travis-ci.org/libvirt/libvirt-go-xml.svg?branch=master)](https://travis-ci.org/libvirt/libvirt-go-xml) [![GoDoc](https://godoc.org/libvirt.org/libvirt-go-xml?status.svg)](https://godoc.org/libvirt.org/libvirt-go-xml)
+# libvirt-go-xml [![build status](https://gitlab.com/berrange/libvirt-go-xml/badges/master/pipeline.svg)](https://gitlab.com/berrange/libvirt-go-xml/-/commits/master) [![GoDoc](https://godoc.org/libvirt.org/libvirt-go-xml?status.svg)](https://godoc.org/libvirt.org/libvirt-go-xml)
 
 Go API for manipulating libvirt XML documents
 
-- 
2.24.1

Re: [libvirt-go-xml PATCH 1/2] gitlab: add CI definition for GitLab
Posted by Andrea Bolognani 5 years, 10 months ago
On Tue, 2020-03-31 at 14:34 +0100, Daniel P. Berrangé wrote:
> +++ b/README.md
> @@ -1,4 +1,4 @@
> -# libvirt-go-xml [![Build Status](https://travis-ci.org/libvirt/libvirt-go-xml.svg?branch=master)](https://travis-ci.org/libvirt/libvirt-go-xml) [![GoDoc](https://godoc.org/libvirt.org/libvirt-go-xml?status.svg)](https://godoc.org/libvirt.org/libvirt-go-xml)
> +# libvirt-go-xml [![build status](https://gitlab.com/berrange/libvirt-go-xml/badges/master/pipeline.svg)](https://gitlab.com/berrange/libvirt-go-xml/-/commits/master) [![GoDoc](https://godoc.org/libvirt.org/libvirt-go-xml?status.svg)](https://godoc.org/libvirt.org/libvirt-go-xml)

s/berrange/libvirt/g ;)

Also, wouldn't

  https://gitlab.com/libvirt/libvirt-go-xml/pipelines

be a better location to send people who click on the pipeline status
image?


With at least the first issue addressed,

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt-go-xml PATCH 1/2] gitlab: add CI definition for GitLab
Posted by Daniel P. Berrangé 5 years, 10 months ago
On Tue, Apr 07, 2020 at 04:38:39PM +0200, Andrea Bolognani wrote:
> On Tue, 2020-03-31 at 14:34 +0100, Daniel P. Berrangé wrote:
> > +++ b/README.md
> > @@ -1,4 +1,4 @@
> > -# libvirt-go-xml [![Build Status](https://travis-ci.org/libvirt/libvirt-go-xml.svg?branch=master)](https://travis-ci.org/libvirt/libvirt-go-xml) [![GoDoc](https://godoc.org/libvirt.org/libvirt-go-xml?status.svg)](https://godoc.org/libvirt.org/libvirt-go-xml)
> > +# libvirt-go-xml [![build status](https://gitlab.com/berrange/libvirt-go-xml/badges/master/pipeline.svg)](https://gitlab.com/berrange/libvirt-go-xml/-/commits/master) [![GoDoc](https://godoc.org/libvirt.org/libvirt-go-xml?status.svg)](https://godoc.org/libvirt.org/libvirt-go-xml)
> 
> s/berrange/libvirt/g ;)

Heh, that's what comes from copying the code snippet from the
gitlab admin page

> 
> Also, wouldn't
> 
>   https://gitlab.com/libvirt/libvirt-go-xml/pipelines
> 
> be a better location to send people who click on the pipeline status
> image?

This is just copied from the recommended badge snippet that gitlab
displays in the "Settings -> CI -> General Pipelines" page. Not sure
why they think sending to the commits page is better, but yeah, it
seems more useful to go the pipelines page.


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 :|