-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
25 lines (20 loc) · 1.26 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
.PHONY: build test deploy-packages test-in-docker
CI_REGISTRY_IMAGE ?= navigator
CI_COMMIT_SHORT_SHA ?= $(shell basename $(shell git rev-parse --show-toplevel))
build:
docker build -t $(CI_REGISTRY_IMAGE)/builds:$(CI_COMMIT_SHORT_SHA) .
test:
docker run -e GITHUB_TOKEN -e GITHUB_USERNAME -e CI_API_V4_URL -e CI_PROJECT_ID -e CI_JOB_TOKEN $(build_tag)
deploy-packages:
cd pn-mapping && export VERSION=`head -1 project.clj | sed 's/.*"\([^"]*\)"/\1/'` && lein jar && lein pom && \
mvn deploy:deploy-file -s ../ci_settings.xml -DpomFile=pom.xml -Dfile=target/map-$$VERSION.jar -DrepositoryId=gitlab-maven \
-Durl="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven"
cd pn-indexer && export VERSION=`head -1 project.clj | sed 's/.*"\([^"]*\)"/\1/'` && lein jar && lein pom && \
mvn deploy:deploy-file -s ../ci_settings.xml -DpomFile=pom.xml -Dfile=target/indexer-$$VERSION.jar -DrepositoryId=gitlab-maven \
-Durl="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven"
cd pn-dispatcher && mvn deploy -s ../ci_settings.xml
cd pn-sync && mvn deploy -s ../ci_settings.xml
test-in-docker:
mkdir -p ~/.m2
sed -e "s/GITHUB_USERNAME/$(GITHUB_USERNAME)/" -e "s/GITHUB_TOKEN/$(GITHUB_TOKEN)/" .settings.example.xml > ~/.m2/settings.xml
cd pn-dispatcher && mvn test