[postgis-tickets] r17774 - [drone] Reorganize configuration to use external script

Sandro Santilli strk at kbt.io
Fri Aug 23 08:58:43 PDT 2019


Author: strk
Date: 2019-08-23 08:58:43 -0700 (Fri, 23 Aug 2019)
New Revision: 17774

Added:
   trunk/ci/dronie/
   trunk/ci/dronie/postgis_regress.sh
Modified:
   trunk/.drone-1.0.yml
Log:
[drone] Reorganize configuration to use external script

Also add installcheck step

Modified: trunk/.drone-1.0.yml
===================================================================
--- trunk/.drone-1.0.yml	2019-08-23 09:56:37 UTC (rev 17773)
+++ trunk/.drone-1.0.yml	2019-08-23 15:58:43 UTC (rev 17774)
@@ -5,71 +5,30 @@
 # See https://git.osgeo.org/gitea/postgis/postgis-docker
 # todo: add docker images from https://hub.docker.com/r/postgis/postgis-build-env/tags/
 test-image: &test-image docker.kbt.io/postgis/build-test:trisquel2
+clone: &clone
+    image: plugins/git
+    depth: 20
+    recursive: false
+
 kind: pipeline
-name: pg-9.5
+name: build
+clone: *clone
 steps:
-  - name: build
+  - name: build-9.5
     image: *test-image
     pull: always
     commands:
-      - export PGVER=9.5
-      - service postgresql start $PGVER
-      - export PGPORT=`grep ^port /etc/postgresql/$PGVER/main/postgresql.conf | awk '{print $3}'`
-      - export PATH=/usr/lib/postgresql/$PGVER/bin:$PATH
-      - psql --version
-      - ./autogen.sh
-      - ./configure CFLAGS="-O0 -Wall -fno-omit-frame-pointer -Werror" --without-interrupt-tests
-      - make -j
-      # we should maybe wait for postgresql service to startup here...
-      - psql -c "select version()" template1
-      - make check RUNTESTFLAGS=-v
-      - make install
-      - utils/check_all_upgrades.sh -s
-        `grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'`
----
-test-image: &test-image docker.kbt.io/postgis/build-test:trisquel2
-kind: pipeline
-name: pg-9.6
-steps:
-  - name: build
+      - PGVER=9.5 sh ci/dronie/postgis_regress.sh
+
+  - name: build-9.6
     image: *test-image
     pull: always
     commands:
-      - export PGVER=9.6
-      - service postgresql start $PGVER
-      - export PGPORT=`grep ^port /etc/postgresql/$PGVER/main/postgresql.conf | awk '{print $3}'`
-      - export PATH=/usr/lib/postgresql/$PGVER/bin:$PATH
-      - psql --version
-      - ./autogen.sh
-      - ./configure CFLAGS="-O0 -Wall -fno-omit-frame-pointer -Werror" --without-interrupt-tests
-      - make -j
-      # we should maybe wait for postgresql service to startup here...
-      - psql -c "select version()" template1
-      - make check RUNTESTFLAGS=-v
-      - make install
-      - utils/check_all_upgrades.sh -s
-        `grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'`
----
-test-image: &test-image docker.kbt.io/postgis/build-test:trisquel2
-kind: pipeline
-name: pg-10
-steps:
-  - name: build
+      - PGVER=9.6 sh ci/dronie/postgis_regress.sh
+
+  - name: build-10
     image: *test-image
     pull: always
     commands:
-      - export PGVER=10
-      - service postgresql start $PGVER
-      - export PGPORT=`grep ^port /etc/postgresql/$PGVER/main/postgresql.conf | awk '{print $3}'`
-      - export PATH=/usr/lib/postgresql/$PGVER/bin:$PATH
-      - psql --version
-      - ./autogen.sh
-      - ./configure CFLAGS="-O0 -Wall -fno-omit-frame-pointer -Werror" --without-interrupt-tests
-      - make -j
-      # we should maybe wait for postgresql service to startup here...
-      - psql -c "select version()" template1
-      - make check RUNTESTFLAGS=-v
-      - make install
-      - utils/check_all_upgrades.sh -s
-        `grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'`
+      - PGVER=10 sh ci/dronie/postgis_regress.sh
 ...

Added: trunk/ci/dronie/postgis_regress.sh
===================================================================
--- trunk/ci/dronie/postgis_regress.sh	                        (rev 0)
+++ trunk/ci/dronie/postgis_regress.sh	2019-08-23 15:58:43 UTC (rev 17774)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Exit on first error
+set -e
+
+service postgresql start $PGVER
+export PGPORT=`grep ^port /etc/postgresql/$PGVER/main/postgresql.conf | awk '{print $3}'`
+export PATH=/usr/lib/postgresql/$PGVER/bin:$PATH
+psql --version
+./autogen.sh
+./configure CFLAGS="-O0 -Wall -fno-omit-frame-pointer -Werror" --without-interrupt-tests
+make clean
+make -j
+# we should maybe wait for postgresql service to startup here...
+psql -c "select version()" template1
+RUNTESTFLAGS=-v make check
+make install
+RUNTESTFLAGS=-v make installcheck
+utils/check_all_upgrades.sh -s \
+  `grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'`



More information about the postgis-tickets mailing list