Skip to content
Snippets Groups Projects
Commit 12ab8841690a authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

Add docker_build script

parent 1639785382a3
No related branches found
No related tags found
No related merge requests found
1.2
......@@ -13,7 +13,7 @@
#
# - access to pg database
#
# Version 1.0
# Version 1.2
here=$(dirname $0)
project_home=$here/..
dbname=$(basename $(readlink -f $project_home))_test
......
#!/bin/zsh
# template version 1.2
# TODO add a way to bypass the value, maybe with a key in the setup.cfg file
repository=dockerhub.xcg.io
# TODO add a way to bypass the value, maybe with a key in the setup.cfg file
project_home=$(dirname $0)/..
image=$(basename $(readlink -f $project_home))
pushd $project_home
# Ensureconf
hg cfensureconf || { echo 'hg cfensureconf failed' ; popd ; exit 1; }
popd
# Grab latest base image
ODOO_TYPE=$(cat $project_home/odoo_type)
if [ "$ODOO_TYPE" = "odoo8" ];
then
docker pull xcgd/odoo:8.0 || { echo 'Pull failed' ; exit 1; }
else
docker pull xcgd/odoo:7.0 || { echo 'Pull failed' ; exit 1; }
fi
docker build -t $repository/$image $project_home || { echo 'Build failed' ; exit 1; }
# tip is latest in docker
for tag in $(cd $project_home && hg id -t);
do
if [[ ! -z "$tag" && "tip" != "$tag" ]]
then
echo "Docker tag with hg tag: $tag"
docker tag -f $repository/$image $repository/$image:$tag || { echo 'Tag failed' ; exit 1; }
fi
done
for bookmark in $(cd $project_home && hg id -B);
do
echo "Docker tag with hg bookmark: $bookmark"
docker tag -f $repository/$image $repository/$image:$bookmark || { echo 'Tag failed' ; exit 1; }
done
echo "Pushing docker image"
docker push $repository/$image || { echo 'Push failed' ; exit 1; }
#!/bin/zsh
# vim: set shiftwidth=4 softtabstop=4:
# Version 1.0
# Version 1.2
dbname=$1
here=$(dirname $0)
if [[ -z "$dbname" ]];
......
[bumpversion]
current_version = 1.1
parse = (?P<major>\d+)\.(?P<minor>\d+)(?P<release>(_a|b|rc|.)?)(?P<patch>\d*)(_post(?P<post>\d+))?
current_version = 1.2
parse = (?P<major>\d+)\.(?P<minor>\d+)
serialize =
......@@ -4,5 +4,2 @@
serialize =
{major}.{minor}{release}{patch}.post{post}
{major}.{minor}{release}{patch}
{major}.{minor}{release}
{major}.{minor}
......@@ -8,5 +5,4 @@
{major}.{minor}
tag_name = TAG_{new_version}
[bumpversion:file:VERSION]
......@@ -10,9 +6,5 @@
[bumpversion:file:VERSION]
[bumpversion:file:doc/conf.py]
search =
release = '{current_version}'
replace =
release = '{new_version}'
[bumpversion:file:do_tests]
......@@ -18,9 +10,3 @@
[bumpversion:part:release]
values =
a
b
rc
.
optional_value = .
[bumpversion:file:run_tests]
......@@ -26,9 +12,3 @@
[bumpversion:file:requirements]
[bumpversion:file:bin/do_tests]
[bumpversion:file:bin/run_tests]
[bumpversion:file:bin/start]
[bumpversion:file:start]
......@@ -34,5 +14,3 @@
[bumpversion:file:conf/dev/odoo.conf]
[bumpversion:file:doc/Makefile]
[bumpversion:file:docker_build]
......@@ -38,5 +16,1 @@
[bumpversion:file:dev_install]
[bumpversion:file:.drone.yml]
......@@ -5,7 +5,7 @@
#
# You can set ODOO_DATA_DIR and ODOO_DB_HOST if you want to avoid using the default value ($HOME/var/tmp and localhost)
#
# Version 1.1
# Version 1.2
here=$(readlink -f $(dirname $0)/..)
echo "Starting odoo for development"
python=python
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment