Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nomad with make #49

Open
tiancheng91 opened this issue Nov 19, 2020 · 1 comment
Open

nomad with make #49

tiancheng91 opened this issue Nov 19, 2020 · 1 comment

Comments

@tiancheng91
Copy link
Owner

VERSION_TAG=$(shell git rev-parse --short HEAD)

.PHONY: build
build:
    docker build -t artifactory:9090/perf/influxdb-foobar:$(VERSION_TAG) .

.PHONY: push
push: build
    docker push artifactory:9090/perf/influxdb-foobar:$(VERSION_TAG)
        
.PHONY: nomad.job
nomad.job:
   hclfmt -w nomad.job.tpl
   export VERSION_TAG=$(VERSION_TAG) &&
   envsubst < "nomad.job.tpl" > "nomad.job"

.PHONY: clean
clean:
   @rm nomad.job

.PHONY: deploy
deploy: push nomad.job
   nomad run -verbose nomad.job
   make clean

.PHONY: stop
stop:
   nomad stop perf-influxdb-foobar

.PHONY: status
status:
   nomad status perf-influxdb-foobar

.PHONY: logs
logs:
   nomad logs -f -job perf-influxdb-foobar
@tiancheng91
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant