You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:30:00 UTC
[buildstream] 02/03: Test buildstream with a reference cache server
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch willsalmon/remotecache
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit de5283507727db7f41902657c6fc3ac1821d7706
Author: William Salmon <wi...@codethink.co.uk>
AuthorDate: Thu Jul 23 17:31:04 2020 +0100
Test buildstream with a reference cache server
This test defines a docker compose for a buildstream cache server and
uses it.
This stage could be altered or duplicated to use other cache servers so we
can check our continued compatibility.
---
.gitlab-ci.yml | 24 +++++++++++-
...-compose.yml => buildgrid-remote-execution.yml} | 0
.gitlab-ci/cache-server.yml | 44 ++++++++++++++++++++++
3 files changed, 67 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7ba05f5..c89652d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -189,12 +189,34 @@ tests-remote-execution:
DOCKER_DRIVER: overlay2
# Required to be able to connect to the docker daemon. See https://gitlab.com/gitlab-org/gitlab-runner/issues/4501
DOCKER_TLS_CERTDIR: ""
- COMPOSE_MANIFEST: .gitlab-ci/buildgrid-compose.yml
+ COMPOSE_MANIFEST: .gitlab-ci/buildgrid-remote-execution.yml
ARTIFACT_CACHE_SERVICE: http://docker:50052
REMOTE_EXECUTION_SERVICE: http://docker:50051
SOURCE_CACHE_SERVICE: http://docker:50052
PYTEST_ARGS: "--color=yes --remote-execution"
+tests-remote-cache:
+ allow_failure: true
+ image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:31-${DOCKER_IMAGE_VERSION}
+ <<: *tests
+ before_script:
+ - dnf install -y docker docker-compose
+ - docker-compose --file ${COMPOSE_MANIFEST} up --detach
+ after_script:
+ - docker-compose --file ${COMPOSE_MANIFEST} stop
+ - docker-compose --file ${COMPOSE_MANIFEST} logs
+ - docker-compose --file ${COMPOSE_MANIFEST} down
+ services:
+ - docker:stable-dind
+ variables:
+ DOCKER_HOST: tcp://docker:2375
+ DOCKER_DRIVER: overlay2
+ # Required to be able to connect to the docker daemon. See https://gitlab.com/gitlab-org/gitlab-runner/issues/4501
+ DOCKER_TLS_CERTDIR: ""
+ COMPOSE_MANIFEST: .gitlab-ci/cache-server.yml
+ ARTIFACT_CACHE_SERVICE: http://docker:50052
+ PYTEST_ARGS: "--color=yes --remote-cache"
+
tests-no-usedevelop:
# Ensure that tests also pass without `--develop` flag.
image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:31-${DOCKER_IMAGE_VERSION}
diff --git a/.gitlab-ci/buildgrid-compose.yml b/.gitlab-ci/buildgrid-remote-execution.yml
similarity index 100%
rename from .gitlab-ci/buildgrid-compose.yml
rename to .gitlab-ci/buildgrid-remote-execution.yml
diff --git a/.gitlab-ci/cache-server.yml b/.gitlab-ci/cache-server.yml
new file mode 100644
index 0000000..312ab11
--- /dev/null
+++ b/.gitlab-ci/cache-server.yml
@@ -0,0 +1,44 @@
+##
+# BuildGrid Compose manifest for BuildStream.
+#
+# Spins-up a unnamed and unauthenticated grid:
+# - Controller + CAS + AC at http://localhost:50051
+# - Ref. + CAS at: http://localhost:50052
+#
+# BuildStream configuration snippet:
+#
+# artifacts:
+# url: http://localhost:50052
+# push: true
+# remote-execution:
+# execution-service:
+# url: http://localhost:50051
+# action-cache-service:
+# url: http://localhost:50051
+# storage-service:
+# url: http://localhost:50051
+#
+# Basic usage:
+# - docker-compose -f buildgrid-compose.yml up
+# - docker-compose -f buildgrid-compose.yml down
+#
+version: "3.2"
+
+services:
+ controller:
+ image: buildstream/buildstream:dev
+ command: ["bst-artifact-server","--port",
+ "50052",
+ "--enable-push",
+ "/artifacts"
+ ]
+ ports:
+ - 50052:50052
+ networks:
+ - grid
+networks:
+ grid:
+ driver: bridge
+
+volumes:
+ cache: