Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
packme
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PaNOSC
Data Analysis Services
packme
Commits
0df1b6f0
Commit
0df1b6f0
authored
Jan 17, 2020
by
eric pellegrini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added static type to Packman module
parent
ab095296
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/packme/PackerTemplate.py
src/packme/PackerTemplate.py
+4
-4
src/packme/Packman.py
src/packme/Packman.py
+2
-2
No files found.
src/packme/PackerTemplate.py
View file @
0df1b6f0
...
...
@@ -18,7 +18,7 @@ class PackerTemplate:
- processors: a list of dictionaries where each dictionary defines actions to be run after the image is built
"""
def
__init__
(
self
,
name
:
str
,
yaml_node
:
yaml
.
Node
,
packages
:
List
[
str
])
->
None
:
def
__init__
(
self
,
name
:
str
,
yaml_node
:
dict
,
packages
:
List
[
str
])
->
None
:
"""Constructor
"""
...
...
@@ -132,7 +132,7 @@ class PackerTemplate:
parent_builder
[
"iso_url"
]
=
"./builds/{}-{}"
.
format
(
parent_template
.
name
,
builder_name
)
parent_builder
[
"iso_checksum_type"
]
=
"none"
parent_builder
[
"iso_checksum_url"
]
=
"none"
parent_builder
[
"output_directory"
]
=
os
.
path
.
join
(
self
.
_templates_dir
,
self
.
_name
)
parent_builder
[
"output_directory"
]
=
os
.
path
.
join
(
self
.
_templates_dir
,
self
.
_name
)
self
.
_builders
.
insert
(
0
,
parent_builder
)
# If the builder is also defined in the child config, use the child config one and specify the image dependency
...
...
@@ -181,8 +181,8 @@ class PackerTemplate:
except
FileNotFoundError
:
manifest_data
=
[]
else
:
manifest_data
=
yaml
.
safe_load
(
fin
)
manifest_data
=
manifest_data
[
"provisioners"
]
root_node
=
yaml
.
safe_load
(
fin
)
manifest_data
=
root_node
[
"provisioners"
]
# Loop over the provisioners list and update when necessary relative paths with absolute one for packer to run correctly
for
provisioner
in
manifest_data
:
...
...
src/packme/Packman.py
View file @
0df1b6f0
...
...
@@ -4,7 +4,7 @@ import shutil
import
subprocess
import
yaml
from
typing
import
List
,
Optional
from
typing
import
Any
,
Dict
,
List
,
Optional
from
.PackerTemplate
import
PackerTemplate
...
...
@@ -167,7 +167,7 @@ class Packman:
templates
=
self
.
get_templates_selection
(
selected_templates
)
config_hierarchy
=
[]
config_hierarchy
:
List
[
str
]
=
[]
for
template
in
templates
:
self
.
_build_template_hierarchy
(
template
,
config_hierarchy
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment