Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
d352505c
Commit
d352505c
authored
9 years ago
by
Jenkins
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "add "--template-only" flag for tools/build.py"
parents
c879b1f2
9bacf1bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kolla/cmd/build.py
+8
-1
8 additions, 1 deletion
kolla/cmd/build.py
with
8 additions
and
1 deletion
kolla/cmd/build.py
+
8
−
1
View file @
d352505c
...
@@ -282,6 +282,9 @@ def merge_args_and_config(settings_from_config_file):
...
@@ -282,6 +282,9 @@ def merge_args_and_config(settings_from_config_file):
help
=
(
'
Path to custom file to be added at
'
help
=
(
'
Path to custom file to be added at
'
'
end of Dockerfiles for final images
'
),
'
end of Dockerfiles for final images
'
),
type
=
str
)
type
=
str
)
parser
.
add_argument
(
'
--template-only
'
,
help
=
(
"
Don
'
t build images. Generate Dockerfile only
"
),
action
=
'
store_true
'
)
return
vars
(
parser
.
parse_args
())
return
vars
(
parser
.
parse_args
())
...
@@ -297,6 +300,7 @@ class KollaWorker(object):
...
@@ -297,6 +300,7 @@ class KollaWorker(object):
self
.
install_type
=
config
[
'
install_type
'
]
self
.
install_type
=
config
[
'
install_type
'
]
self
.
tag
=
config
[
'
tag
'
]
self
.
tag
=
config
[
'
tag
'
]
self
.
image_prefix
=
self
.
base
+
'
-
'
+
config
[
'
install_type
'
]
+
'
-
'
self
.
image_prefix
=
self
.
base
+
'
-
'
+
config
[
'
install_type
'
]
+
'
-
'
self
.
images
=
list
()
if
'
-
'
in
config
[
'
install_type
'
]:
if
'
-
'
in
config
[
'
install_type
'
]:
self
.
install_type
,
self
.
install_metatype
=
\
self
.
install_type
,
self
.
install_metatype
=
\
...
@@ -445,7 +449,6 @@ class KollaWorker(object):
...
@@ -445,7 +449,6 @@ class KollaWorker(object):
self
.
image_statuses_unmatched
)
self
.
image_statuses_unmatched
)
def
build_image_list
(
self
):
def
build_image_list
(
self
):
self
.
images
=
list
()
for
path
in
self
.
docker_build_paths
:
for
path
in
self
.
docker_build_paths
:
# Reading parent image name
# Reading parent image name
with
open
(
os
.
path
.
join
(
path
,
'
Dockerfile
'
))
as
f
:
with
open
(
os
.
path
.
join
(
path
,
'
Dockerfile
'
))
as
f
:
...
@@ -543,6 +546,10 @@ def main():
...
@@ -543,6 +546,10 @@ def main():
kolla
.
find_dockerfiles
()
kolla
.
find_dockerfiles
()
kolla
.
create_dockerfiles
()
kolla
.
create_dockerfiles
()
if
config
[
'
template_only
'
]:
LOG
.
info
(
'
Dockerfiles are generated in {}
'
.
format
(
kolla
.
working_dir
))
return
# We set the atime and mtime to 0 epoch to preserve allow the Docker cache
# We set the atime and mtime to 0 epoch to preserve allow the Docker cache
# to work like we want. A different size or hash will still force a rebuild
# to work like we want. A different size or hash will still force a rebuild
kolla
.
set_time
()
kolla
.
set_time
()
...
...
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