[PATCH wayland 1/2] gitlab-ci: Trigger site's project pipeline

Matheus Santana embs at cin.ufpe.br
Mon Jul 16 17:08:34 UTC 2018


For automatically building and publishing docs.

It'll be necessary to

1. create a pipeline trigger for the [site's project][trigger]
2. create a variable within [wayland's CI][envar] whose key is
   WAYLAND_FREEDESKTOP_ORG_PIPELINE_TRIGGER_TOKEN and value is the token
   created in previous step

Also see https://gitlab.freedesktop.org/wayland/wayland/issues/48

Signed-off-by: Matheus Santana <embs at cin.ufpe.br>

[trigger]: https://gitlab.freedesktop.org/wayland/wayland.freedesktop.org/settings/ci_cd
[envar]: https://gitlab.freedesktop.org/wayland/wayland/settings/ci_cd
---
 .gitlab-ci.yml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2489665..c6840e6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ image: debian:stretch
 
 stages:
   - build
+  - deploy
 
 before_script:
   - echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
@@ -10,7 +11,7 @@ before_script:
   - echo 'exit 101' >> /usr/sbin/policy-rc.d
   - chmod +x /usr/sbin/policy-rc.d
   - apt-get update
-  - apt-get -y --no-install-recommends install build-essential automake autoconf libtool pkg-config libexpat1-dev libffi-dev libxml2-dev doxygen graphviz xmlto xsltproc docbook-xsl
+  - apt-get -y --no-install-recommends install build-essential automake autoconf libtool pkg-config libexpat1-dev libffi-dev libxml2-dev doxygen graphviz xmlto xsltproc docbook-xsl curl ca-certificates
 
 build-native:
   stage: build
@@ -34,3 +35,10 @@ build-native:
     - build-*/wayland*/_build/sub/*.log
     - build-*/*.log
     - prefix-*
+
+publish-docs:
+  stage: deploy
+  script:
+  - curl -X POST -F token=$WAYLAND_FREEDESKTOP_ORG_PIPELINE_TRIGGER_TOKEN -F ref=master https://gitlab.freedesktop.org/api/v4/projects/136/trigger/pipeline
+  only:
+  - master
-- 
2.1.4



More information about the wayland-devel mailing list