Makefile: docker tag per git repo

This commit is contained in:
pedro 2023-10-10 10:54:22 +02:00
parent 8e5b0ce928
commit faf55deb84
1 changed files with 21 additions and 6 deletions

View File

@ -1,12 +1,27 @@
project := dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral
branch := `git branch --show-current`
commit := `git log -1 --format=%h`
tag := ${branch}__${commit}
# docker images
orchestra_image := ${project}/orchestra:${tag}
musician_image := ${project}/musician:${tag}
# docker images
orchestra_branch := `git -C django-orchestra branch --show-current`
orchestra_commit := `git -C django-orchestra log -1 --format=%h`
orchestra_tag := ${orchestra_branch}__${orchestra_commit}
orchestra_image := ${project}/orchestra:${orchestra_tag}
musician_branch := `git -C django-musician branch --show-current`
musician_commit := `git -C django-musician log -1 --format=%h`
musician_tag := ${orchestra_branch}__${musician_commit}
musician_image := ${project}/musician:${musician_tag}
orchestra_branch := `git -C django-orchestra branch --show-current`
orchestra_commit := `git -C django-orchestra log -1 --format=%h`
orchestra_tag := ${orchestra_branch}__${orchestra_commit}
orchestra_image := ${project}/orchestra:${orchestra_tag}
musician_branch := `git -C django-musician branch --show-current`
musician_commit := `git -C django-musician log -1 --format=%h`
musician_tag := ${orchestra_branch}__${musician_commit}
musician_image := ${project}/musician:${musician_tag}
docker_build:
docker build -f docker/orchestra.Dockerfile -t ${orchestra_image} .