Compare commits

...

3 commits

Author SHA1 Message Date
pedro 24560d2370 new orchestra & musician images with sso branch 2023-10-10 10:59:40 +02:00
pedro faf55deb84 Makefile: docker tag per git repo 2023-10-10 10:54:22 +02:00
pedro 8e5b0ce928 add script to pull git repos 2023-10-10 10:54:09 +02:00
4 changed files with 57 additions and 8 deletions

3
.gitignore vendored
View file

@ -2,3 +2,6 @@
.env
# emacs
*~
django-orchestra
django-musician

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} .

View file

@ -3,7 +3,7 @@ services:
orchestra:
init: true
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/orchestra:add_musician__95b0ed93
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/orchestra:sso__533d749
environment:
- SECRET_KEY=${ORCHESTRA_SECRET_KEY:-123456}
ports:
@ -14,7 +14,7 @@ services:
musician:
init: true
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/musician:add_musician__95b0ed93
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/musician:sso__addc4fe
ports:
- "8080:8080"
environment:

31
pull-repos.sh Executable file
View file

@ -0,0 +1,31 @@
#!/bin/sh
set -e
set -u
# DEBUG
set -x
# clone or pull git repo
_pull() {
myurl="${1}"
mydir="$(basename "${myurl}")"
mybranch="${2}"
if [ -d "${mydir}" ]; then
cd "${mydir}"
git checkout "${mybranch}"
git pull
cd -
else
git clone "${myurl}" "${mydir}"
fi
}
main() {
_pull 'https://gitea.pangea.org/pangea/django-orchestra' 'sso'
_pull 'https://gitea.pangea.org/pangea/django-musician' 'sso'
}
main "${@}"