-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (31 loc) · 1 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
SHELL := /bin/bash
# test
TEST_CMD := python -m eccodes selfcheck
TEST2_CMD := grib_ls /samples/icon_global.grib2
# load variables from ./hooks/env
DATE := ${shell . ./hooks/env && echo $$DATE}
SOURCE_URL := ${shell . ./hooks/env && echo $$SOURCE_URL}
SOURCE_BRANCH := ${shell . ./hooks/env && echo $$SOURCE_BRANCH}
SOURCE_COMMIT := ${shell . ./hooks/env && echo $$SOURCE_COMMIT}
SOURCE_TAG := ${shell . ./hooks/env && echo $$SOURCE_TAG}
DOCKER_TAG := ${shell . ./hooks/env && echo $$DOCKER_TAG}
IMAGE_NAME := ${shell . ./hooks/env && echo $$IMAGE_NAME}
all: build
.PHONY: build run run-interactive test login login-user-pass push clean
build:
./hooks/build
run:
@docker run --rm -i -t ${IMAGE_NAME}
run-interactive:
@docker run --rm -i -t ${IMAGE_NAME} sh
test:
@docker run --rm -i -t ${IMAGE_NAME} ${TEST_CMD}
@docker run --rm -i -t ${IMAGE_NAME} ${TEST2_CMD}
login:
@docker login
login-user-pass:
@docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
push:
./hooks/post_push
clean:
@docker rmi ${DOCKER_REPO}