From c2832ba6e5e0207bc2591451a6390a2697b8b898 Mon Sep 17 00:00:00 2001 From: thijsheijden <hi@thijsheijden.nl> Date: Mon, 17 May 2021 19:11:15 +0200 Subject: [PATCH] Updated Makefile with git.science.uu.nl login --- Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 69ce32c..a79a8b6 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ lint: dep ## Lint the files @golint -set_exit_status ./... -test: ## Run unittests +test: dep ## Run unittests @go test -cover -coverprofile=coverage.txt -covermode count ./... -dep: ## Get the dependencies +dep: login ## Get the dependencies @go get -a -v ./... @go get google.golang.org/grpc/internal/transport@v1.37.0 @go get google.golang.org/grpc@v1.37.0 @@ -26,7 +26,7 @@ macos: $(eval export GOOS := darwin) @go build -o builds/main ./cmd/query-service/ -linux: # Build for linux +linux: login # Build for linux $(eval export GOOS := linux) CGO_ENABLED=0 go build -o builds/main ./cmd/query-service/ @@ -34,7 +34,6 @@ run: ./builds/main develop-sivan: - $(eval export RABBIT_USER := haha-test) $(eval export RABBIT_PASSWORD := dikkedraak) $(eval export RABBIT_HOST := 192.168.178.158) @@ -48,7 +47,6 @@ develop-sivan: develop: - $(eval export RABBIT_USER := guest) $(eval export RABBIT_PASSWORD := guest) $(eval export RABBIT_HOST := localhost) @@ -62,14 +60,17 @@ develop: @go run cmd/query-service/main.go -docker: +docker: login make linux @docker build -t query-service:latest . @docker tag query-service:latest datastropheregistry.azurecr.io/query-service:latest @docker push datastropheregistry.azurecr.io/query-service\:latest -staging: +staging: login make linux @docker build -t query-service-staging:latest . @docker tag query-service-staging:latest datastropheregistry.azurecr.io/query-service-staging:latest - @docker push datastropheregistry.azurecr.io/query-service-staging:latest \ No newline at end of file + @docker push datastropheregistry.azurecr.io/query-service-staging:latest + +login: + echo -e "machine git.science.uu.nl\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc \ No newline at end of file -- GitLab