2021-06-03 07:43:44 +00:00
|
|
|
.PHONY: test shellcheck docopt release-installer build push
|
2020-09-08 06:48:53 +00:00
|
|
|
|
2021-01-01 12:47:37 +00:00
|
|
|
test:
|
2020-12-31 20:10:52 +00:00
|
|
|
@sudo DOCKER_CONTEXT=default docker run \
|
|
|
|
-v $$(pwd):/workdir \
|
|
|
|
--privileged \
|
|
|
|
-d \
|
|
|
|
--name=abra-test-dind \
|
|
|
|
-e DOCKER_TLS_CERTDIR="" \
|
2021-06-03 07:11:50 +00:00
|
|
|
decentral1se/docker-dind-bats-kcov \
|
2021-05-29 21:37:16 +00:00
|
|
|
@DOCKER_CONTEXT=default sudo docker exec \
|
2020-12-31 20:10:52 +00:00
|
|
|
-it \
|
|
|
|
abra-test-dind \
|
2021-01-01 11:26:50 +00:00
|
|
|
sh -c "cd /workdir && bats /workdir/tests"
|
2021-05-29 21:37:16 +00:00
|
|
|
@DOCKER_CONTEXT=default sudo docker stop abra-test-dind
|
|
|
|
@DOCKER_CONTEXT=default sudo docker rm abra-test-dind
|
2020-12-31 20:10:52 +00:00
|
|
|
|
2020-10-26 17:04:14 +00:00
|
|
|
shellcheck:
|
|
|
|
@docker run \
|
|
|
|
-it \
|
|
|
|
--rm \
|
|
|
|
-v $$(pwd):/workdir \
|
|
|
|
koalaman/shellcheck-alpine \
|
2021-04-02 13:39:02 +00:00
|
|
|
shellcheck /workdir/abra && \
|
2021-04-04 19:11:25 +00:00
|
|
|
shellcheck /workdir/bin/*.sh
|
2020-10-26 17:04:14 +00:00
|
|
|
|
2020-10-25 20:41:17 +00:00
|
|
|
docopt:
|
|
|
|
@if [ ! -d ".venv" ]; then \
|
|
|
|
python3 -m venv .venv && \
|
|
|
|
.venv/bin/pip install -U pip setuptools wheel && \
|
|
|
|
.venv/bin/pip install docopt-sh; \
|
|
|
|
fi
|
|
|
|
.venv/bin/docopt.sh abra
|
|
|
|
|
2021-03-15 15:54:33 +00:00
|
|
|
release-installer:
|
2021-04-05 10:34:06 +00:00
|
|
|
@DOCKER_CONTEXT=swarm.autonomic.zone \
|
|
|
|
docker stack rm abra-installer-script && \
|
2021-05-31 19:10:51 +00:00
|
|
|
cd deploy/install.abra.coopcloud.tech && \
|
2021-04-05 10:34:06 +00:00
|
|
|
DOCKER_CONTEXT=swarm.autonomic.zone docker stack deploy -c compose.yml abra-installer-script
|
2021-04-02 13:38:49 +00:00
|
|
|
|
2021-04-18 15:42:32 +00:00
|
|
|
release-apps:
|
2021-04-05 10:34:06 +00:00
|
|
|
@DOCKER_CONTEXT=swarm.autonomic.zone \
|
|
|
|
docker stack rm abra-apps-json && \
|
2021-04-18 01:38:11 +00:00
|
|
|
cd deploy/apps.coopcloud.tech && \
|
2021-04-05 10:34:06 +00:00
|
|
|
DOCKER_CONTEXT=swarm.autonomic.zone docker stack deploy -c compose.yml abra-apps-json
|
2021-06-03 07:43:44 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
@docker build -t decentral1se/abra .
|
|
|
|
|
|
|
|
push: build
|
|
|
|
@docker push decentral1se/abra
|