Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
49 lines (42 loc) · 1.47 KB
/
Copy pathTaskfile.yml
File metadata and controls
49 lines (42 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: Apache-2.0
version: "3"
tasks:
default:
cmd: echo "Run the main Taskfile instead of this one."
server:build:
desc: Build Directory server image
cmds:
# NOTE: Always build the image locally to include changes which are not commited
- |
# NOTE: CI env var is set by default on GitHub Actions
if [ "${CI}" == "true" && docker image inspect {{.IMAGE_REPO}}/dir-apiserver:{{.IMAGE_TAG}} > /dev/null 2>&1 ];
then
echo "Image {{.IMAGE_REPO}}/dir-apiserver:{{.IMAGE_TAG}} already exists locally. Skipping build."
else
{{.BAKE_ENV}} docker buildx bake {{.IMAGE_BAKE_OPTS}} dir-apiserver
fi
server:start:
desc: Start local Directory server stack
dir: ./install/docker
env:
DIRECTORY_SERVER_PUBLICATION_SCHEDULER_INTERVAL: 1s
cmds:
- docker compose up -d --build --wait
server:start:debug:
desc: Start local Directory server stack in debug mode
dir: ./install/docker
env:
DIRECTORY_SERVER_PUBLICATION_SCHEDULER_INTERVAL: 1s
cmds:
- docker compose -f docker-compose.yml -f docker-compose.debug.yml up -d --build --wait
server:stop:
desc: Stop local Directory server stack
dir: ./install/docker
cmds:
- docker compose down
server:bench:
desc: Benchmark Directory server code
dir: ./server
cmds:
- go -C . test -run=^$ -bench=. ./...