-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
59 lines (46 loc) · 1.66 KB
/
Makefile
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
50
51
52
53
54
55
56
57
58
59
# Makefile special variables #
.DEFAULT_GOAL := build
# Targets #
.PHONY: build
build:
$(MAKE) -C uplink-sys build
$(MAKE) -C uplink build
.PHONY: lint
lint:
$(MAKE) -C uplink-sys lint
$(MAKE) -C uplink lint
.PHONY: test
test:
$(MAKE) -C uplink-sys test
$(MAKE) -C uplink test
.PHONY: clean
clean: integration-tests-env-down
$(MAKE) -C uplink-sys clean
$(MAKE) -C uplink clean
.PHONY: integration-tests-env-up
integration-tests-env-up: .tmp/up/docker-compose.yaml
cd .tmp/up; docker compose up -d
$(MAKE) .tmp/env
.PHONY: integration-tests-env-down
integration-tests-env-down:
@if [ -f .tmp/up/docker-compose.yaml ]; then cd .tmp/up; docker compose down; fi
rm -rf .tmp
.tmp/env: .tmp/up/storj-up
@cd .tmp/up; ./storj-up credentials -p -e | grep -Ei "^export .+" > ../env
# TODO: This is a hack to get the AWS_* and STORJ_GATEWAY variables without
# overriding the access grants because those variable are only available using
# the storj-up from inside of the container, however, we cannot use the access
# grants because they use the docker compose service name in the URL rather
# than localhost and then it doesn't resolve.
# See: https://github.com/storj/up/issues/45#issuecomment-1288808260
@cd .tmp/up; docker compose exec -T satellite-api storj-up credentials --s3 -e \
-a http://authservice:8888 -s satellite-api:7777 -c satellite-api:10000 \
| grep -E 'AWS|STORJ_GATEWAY' >> ../env
.tmp/up/storj-up: .tmp/up
cd .tmp/up; go build -tags noquic -o storj-up
cd .tmp/up; ./storj-up init minimal,edge,db
.tmp/up:
mkdir -p .tmp
cd .tmp; git clone https://github.com/storj/up.git
cd .tmp/up; git checkout v1.2.7
.tmp/up/docker-compose.yaml: .tmp/up/storj-up