summaryrefslogtreecommitdiff
path: root/.gitlab-ci
diff options
context:
space:
mode:
authorJosh Smith <josh.smith@codethink.co.uk>2020-08-20 16:18:50 +0100
committerQinusty <qinusty@gmail.com>2020-08-26 13:27:44 +0000
commit93d4f0181ad51caacfdf7c5b4de5566413963224 (patch)
tree08759a8022f7e6f9177e236a61ea35764c9ec84d /.gitlab-ci
parent1325f90174dedef240b7791581e550f62b7d3ccd (diff)
downloadbuildstream-93d4f0181ad51caacfdf7c5b4de5566413963224.tar.gz
Add bb-storage/bb-asset-hub cache test job
Diffstat (limited to '.gitlab-ci')
-rw-r--r--.gitlab-ci/buildbarn-remote-cache.yml59
-rw-r--r--.gitlab-ci/config/asset.jsonnet32
-rw-r--r--.gitlab-ci/config/storage.jsonnet26
3 files changed, 117 insertions, 0 deletions
diff --git a/.gitlab-ci/buildbarn-remote-cache.yml b/.gitlab-ci/buildbarn-remote-cache.yml
new file mode 100644
index 000000000..0122fa804
--- /dev/null
+++ b/.gitlab-ci/buildbarn-remote-cache.yml
@@ -0,0 +1,59 @@
+##
+# Buildbarn Compose manifest for BuildStream.
+#
+# Spins-up a unnamed and unauthenticated cache server:
+# - STORAGE at http://localhost:7982
+# - INDEX at: http://localhost:7981
+#
+# BuildStream configuration snippet:
+#
+# artifacts:
+# - url: https://localhost:7981
+# type: index
+# push: true
+# - url: https://localhost:7982
+# type: storage
+# push: true
+#
+# Basic usage:
+# - docker-compose -f buildbarn-remote-cache.yml up
+# - docker-compose -f buildbarn-remote-cache.yml down
+
+version: '3.4'
+
+services:
+ bb-asset:
+ image: qinusty/bb-asset-hub:20200814T141139Z-5e72dd1
+ command: /config/asset.jsonnet
+ restart: unless-stopped
+ expose:
+ - "7981"
+ ports:
+ - "7981:7981"
+ volumes:
+ - type: volume
+ source: assets
+ target: /storage
+ - type: bind
+ source: ./config/
+ target: /config
+
+ bb-storage:
+ image: buildbarn/bb-storage:20200810T194216Z-94a85b4
+ command: /config/storage.jsonnet
+ restart: unless-stopped
+ expose:
+ - "7982"
+ ports:
+ - "7982:7982"
+ volumes:
+ - type: volume
+ source: cas
+ target: /cas
+ - type: bind
+ source: ./config/
+ target: /config
+
+volumes:
+ assets:
+ cas:
diff --git a/.gitlab-ci/config/asset.jsonnet b/.gitlab-ci/config/asset.jsonnet
new file mode 100644
index 000000000..aad06a22e
--- /dev/null
+++ b/.gitlab-ci/config/asset.jsonnet
@@ -0,0 +1,32 @@
+{
+ fetcher: {
+ caching: {
+ fetcher: {
+ // We should never be fetching anything which is not already returned by the caching fetcher.
+ 'error': {
+ code: 5,
+ message: "Asset Not Found",
+ }
+ }
+ }
+ },
+
+ assetStore: {
+ circular: {
+ directory: '/storage',
+ offsetFileSizeBytes: 1024 * 1024,
+ offsetCacheSize: 1000,
+ dataFileSizeBytes: 100 * 1024 * 1024,
+ dataAllocationChunkSizeBytes: 1048576,
+ instances: [''],
+ },
+ },
+ httpListenAddress: ':1111',
+ grpcServers: [{
+ listenAddresses: [':7981'],
+ authenticationPolicy: { allow: {} },
+ }],
+ allowUpdatesForInstances: [''],
+ maximumMessageSizeBytes: 16 * 1024 * 1024,
+}
+
diff --git a/.gitlab-ci/config/storage.jsonnet b/.gitlab-ci/config/storage.jsonnet
new file mode 100644
index 000000000..11fbdbee7
--- /dev/null
+++ b/.gitlab-ci/config/storage.jsonnet
@@ -0,0 +1,26 @@
+{
+ blobstore: {
+ contentAddressableStorage: {
+ circular: {
+ directory: '/cas',
+ offsetFileSizeBytes: 16 * 1024 * 1024,
+ offsetCacheSize: 10000,
+ dataFileSizeBytes: 10 * 1024 * 1024 * 1024,
+ dataAllocationChunkSizeBytes: 16 * 1024 * 1024,
+ },
+ },
+ actionCache: {
+ 'error': {
+ code: 12, # UNIMPLEMENTED
+ message: "AC requests are not supported for this endpoint.",
+ }
+ },
+ },
+ httpListenAddress: ':6981',
+ grpcServers: [{
+ listenAddresses: [':7982'],
+ authenticationPolicy: { allow: {} },
+ }],
+ allowAcUpdatesForInstanceNamePrefixes: [''],
+ maximumMessageSizeBytes: 16 * 1024 * 1024,
+}