summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml175
1 files changed, 101 insertions, 74 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e8794033..c1f9cc32 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,7 @@ stages:
- build
- tests
- package
+ - benchmarks
variables:
@@ -20,6 +21,56 @@ cache:
before_script:
- echo "Running on ${HOST_HOSTNAME:=$(hostname)}"
+
+#
+# "code-check" stage
+#
+
+code-check:
+ stage: code-check
+ image: 0xacab.org:4567/leap/soledad:latest
+ script:
+ - tox -e code-check
+
+
+#
+# "build" stage
+#
+
+build_docker_image:
+ stage: build
+ image: 0xacab.org:4567/leap/soledad:latest
+ services:
+ - docker:dind
+ tags:
+ - docker-in-docker
+ script:
+ - scripts/docker/build-docker-image.sh
+
+
+#
+# "tests" stage
+#
+
+tests:
+ stage: tests
+ image: 0xacab.org:4567/leap/soledad:latest
+ services:
+ - couchdb
+ script:
+ - tox -- --couch-url http://couchdb:5984
+
+e2e:
+ stage: tests
+ image: 0xacab.org:4567/leap/soledad:latest
+ script:
+ - tox -e e2e
+
+
+#
+# "package" stage
+#
+
.job_template: &job_definition
stage: package
image: "0xacab.org:4567/leap/gitlab-buildpackage:build_${DIST}_${ARCH}"
@@ -42,22 +93,57 @@ before_script:
- '*.deb'
- 'results/*'
-code-check:
- stage: code-check
- image: 0xacab.org:4567/leap/soledad:latest
- script:
- - tox -e code-check
+package:amd64_jessie:
+ variables:
+ ARCH: "amd64"
+ DIST: "jessie"
+ REPONAMES: "platform,client"
+ # Default is to fail on warnings, we disable it here
+ # unless a manpage is included (see #8895)
+ LINTIAN_OPTS: "-X filename-length"
+ <<: *job_definition
+
+
+package:amd64_stretch:
+ variables:
+ ARCH: "amd64"
+ DIST: "stretch"
+ REPONAMES: "platform,client"
+ # Default is to fail on warnings, we disable it here
+ # unless a manpage is included (see #8895)
+ LINTIAN_OPTS: "-X filename-length"
+ <<: *job_definition
+
+package:amd64_buster:
+ variables:
+ ARCH: "amd64"
+ DIST: "buster"
+ REPONAMES: "platform,client"
+ # Default is to fail on warnings, we disable it here
+ # unless a manpage is included (see #8895)
+ # Also, ignore the `build-depends-on-obsolete-package` tag
+ # until we can deprecate jessie and take out the dh-systemd
+ # build-depends (see #8963)
+ LINTIAN_OPTS: "-X filename-length --suppress-tags build-depends-on-obsolete-package"
+ <<: *job_definition
+
+package:amd64_zesty:
+ variables:
+ ARCH: "amd64"
+ DIST: "zesty"
+ REPONAMES: "platform,client"
+ # Default is to fail on warnings, we disable it here
+ # unless a manpage is included (see #8895)
+ LINTIAN_OPTS: "-X filename-length"
+ <<: *job_definition
-tests:
- stage: tests
- image: 0xacab.org:4567/leap/soledad:latest
- services:
- - couchdb
- script:
- - tox -- --couch-url http://couchdb:5984
+
+#
+# "benchmarks" stage
+#
time-cpu:
- stage: tests
+ stage: benchmarks
image: 0xacab.org:4567/leap/soledad:latest
tags:
- benchmark
@@ -82,7 +168,7 @@ time-cpu:
- 'if [ -d .benchmarks ]; then find .benchmarks -type f -exec cat {} \; ; fi'
memory:
- stage: tests
+ stage: benchmarks
image: 0xacab.org:4567/leap/soledad:latest
tags:
- benchmark
@@ -107,7 +193,7 @@ memory:
- 'if [ -d .benchmarks ]; then find .benchmarks -type f -exec cat {} \; ; fi'
responsiveness:
- stage: tests
+ stage: benchmarks
image: 0xacab.org:4567/leap/soledad:latest
tags:
- benchmark
@@ -118,62 +204,3 @@ responsiveness:
- curl -s couchdb:5984
- echo "addopts=--elasticsearch-url=\"$ELASTICSEARCH_URL\"" >> pytest.ini && chmod 600 pytest.ini
- /usr/bin/unbuffer tox --recreate -e responsiveness -- --couch-url http://couchdb:5984 | /usr/bin/ts -s
-
-e2e:
- stage: tests
- image: 0xacab.org:4567/leap/soledad:latest
- script:
- - tox -e e2e
-
-build_docker_image:
- stage: build
- image: 0xacab.org:4567/leap/soledad:latest
- services:
- - docker:dind
- tags:
- - docker-in-docker
- script:
- - scripts/docker/build-docker-image.sh
-
-package:amd64_jessie:
- variables:
- ARCH: "amd64"
- DIST: "jessie"
- REPONAMES: "platform,client"
- # Default is to fail on warnings, we disable it here
- # unless a manpage is included (see #8895)
- LINTIAN_OPTS: "-X filename-length"
- <<: *job_definition
-
-package:amd64_stretch:
- variables:
- ARCH: "amd64"
- DIST: "stretch"
- REPONAMES: "platform,client"
- # Default is to fail on warnings, we disable it here
- # unless a manpage is included (see #8895)
- LINTIAN_OPTS: "-X filename-length"
- <<: *job_definition
-
-package:amd64_buster:
- variables:
- ARCH: "amd64"
- DIST: "buster"
- REPONAMES: "platform,client"
- # Default is to fail on warnings, we disable it here
- # unless a manpage is included (see #8895)
- # Also, ignore the `build-depends-on-obsolete-package` tag
- # until we can deprecate jessie and take out the dh-systemd
- # build-depends (see #8963)
- LINTIAN_OPTS: "-X filename-length --suppress-tags build-depends-on-obsolete-package"
- <<: *job_definition
-
-package:amd64_zesty:
- variables:
- ARCH: "amd64"
- DIST: "zesty"
- REPONAMES: "platform,client"
- # Default is to fail on warnings, we disable it here
- # unless a manpage is included (see #8895)
- LINTIAN_OPTS: "-X filename-length"
- <<: *job_definition