6c7b53f585
Closes coop-cloud/abra#196.
60 lines
1.6 KiB
Makefile
60 lines
1.6 KiB
Makefile
.PHONY: test shellcheck docopt release-installer build push deploy-docopt symlink
|
|
|
|
test:
|
|
@sudo DOCKER_CONTEXT=default docker run \
|
|
-v $$(pwd):/workdir \
|
|
--privileged \
|
|
-d \
|
|
--name=abra-test-dind \
|
|
-e DOCKER_TLS_CERTDIR="" \
|
|
decentral1se/docker-dind-bats-kcov \
|
|
@DOCKER_CONTEXT=default sudo docker exec \
|
|
-it \
|
|
abra-test-dind \
|
|
sh -c "cd /workdir && bats /workdir/tests"
|
|
@DOCKER_CONTEXT=default sudo docker stop abra-test-dind
|
|
@DOCKER_CONTEXT=default sudo docker rm abra-test-dind
|
|
|
|
shellcheck:
|
|
@docker run \
|
|
-it \
|
|
--rm \
|
|
-v $$(pwd):/workdir \
|
|
koalaman/shellcheck-alpine \
|
|
sh -c "shellcheck /workdir/abra && \
|
|
shellcheck /workdir/bin/*.sh && \
|
|
shellcheck /workdir/deploy/install.abra.coopcloud.tech/installer"
|
|
|
|
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
|
|
|
|
deploy-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 deploy/install.abra.coopcloud.tech/installer
|
|
|
|
release-installer:
|
|
@DOCKER_CONTEXT=swarm.autonomic.zone \
|
|
docker stack rm abra-installer-script && \
|
|
cd deploy/install.abra.coopcloud.tech && \
|
|
DOCKER_CONTEXT=swarm.autonomic.zone docker stack deploy -c compose.yml abra-installer-script
|
|
|
|
build:
|
|
@docker build -t thecoopcloud/abra .
|
|
|
|
push: build
|
|
@docker push thecoopcloud/abra
|
|
|
|
symlink:
|
|
@mkdir -p ~/.abra/servers/ && \
|
|
ln -srf tests/default ~/.abra/servers && \
|
|
ln -srf tests/apps/* ~/.abra/apps
|