Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
12ab8841690a
Commit
12ab8841690a
authored
8 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
Add docker_build script
parent
1639785382a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
VERSION
+1
-0
1 addition, 0 deletions
VERSION
do_tests
+1
-1
1 addition, 1 deletion
do_tests
docker_build
+46
-0
46 additions, 0 deletions
docker_build
run_tests
+1
-1
1 addition, 1 deletion
run_tests
setup.cfg
+6
-32
6 additions, 32 deletions
setup.cfg
start
+1
-1
1 addition, 1 deletion
start
with
56 additions
and
35 deletions
VERSION
0 → 100644
+
1
−
0
View file @
12ab8841
1.2
This diff is collapsed.
Click to expand it.
do_tests
+
1
−
1
View file @
12ab8841
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
docker_build
0 → 100755
+
46
−
0
View file @
12ab8841
#!/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
;
}
This diff is collapsed.
Click to expand it.
run_tests
+
1
−
1
View file @
12ab8841
#!/bin/zsh
# vim: set shiftwidth=4 softtabstop=4:
# Version 1.
0
# Version 1.
2
dbname
=
$1
here
=
$(
dirname
$0
)
if
[[
-z
"
$dbname
"
]]
;
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
6
−
32
View file @
12ab8841
[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]
This diff is collapsed.
Click to expand it.
start
+
1
−
1
View file @
12ab8841
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment