Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aliens4friends
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
Eclipse Oniro Compliance Toolchain
toolchain
aliens4friends
Commits
0b23574f
Commit
0b23574f
authored
3 years ago
by
Alberto Pianon
Browse files
Options
Downloads
Patches
Plain Diff
add layer support
parent
5057c1d4
No related branches found
No related tags found
1 merge request
!55
add layer support
Pipeline
#8878
failed with stages
in 8 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aliens4friends/commons/harvester.py
+10
-0
10 additions, 0 deletions
aliens4friends/commons/harvester.py
aliens4friends/models/harvest.py
+3
-1
3 additions, 1 deletion
aliens4friends/models/harvest.py
aliens4friends/models/tinfoilhat.py
+2
-0
2 additions, 0 deletions
aliens4friends/models/tinfoilhat.py
with
15 additions
and
1 deletion
aliens4friends/commons/harvester.py
+
10
−
0
View file @
0b23574f
...
...
@@ -5,6 +5,7 @@ import json
import
logging
import
sys
import
re
import
os
from
typing
import
Any
,
Dict
,
List
,
Optional
,
Union
from
aliens4friends.commons.package
import
AlienPackage
...
...
@@ -431,3 +432,12 @@ class Harvester:
source_package
.
tags
=
aggregate_tags
(
container
.
tags
)
source_package
.
binary_packages
=
self
.
_parse_tinfoilhat_packages
(
container
.
packages
)
source_package
.
metadata
=
container
.
recipe
.
metadata
source_package
.
layer
=
(
os
.
path
.
basename
(
container
.
recipe
.
layer
)
if
container
.
recipe
.
layer
else
None
)
if
source_package
.
layer
:
source_package
.
package_id
+=
f
"
@
{
source_package
.
layer
}
"
# FIXME temporary quick&dirty solution to add layer info in the
# dashboard
This diff is collapsed.
Click to expand it.
aliens4friends/models/harvest.py
+
3
−
1
View file @
0b23574f
...
...
@@ -148,7 +148,8 @@ class SourcePackage(BaseModel):
source_files
:
Optional
[
List
[
SourceFile
]]
=
None
,
statistics
:
Optional
[
Statistics
]
=
None
,
binary_packages
:
Optional
[
List
[
BinaryPackage
]]
=
None
,
tags
:
Optional
[
Dict
[
str
,
Union
[
List
[
str
],
Set
[
str
]]]
]
=
None
tags
:
Optional
[
Dict
[
str
,
Union
[
List
[
str
],
Set
[
str
]]]
]
=
None
,
layer
:
Optional
[
str
]
=
None
):
self
.
id
=
id
self
.
name
=
name
...
...
@@ -161,6 +162,7 @@ class SourcePackage(BaseModel):
self
.
source_files
=
SourceFile
.
drilldown
(
source_files
)
self
.
binary_packages
=
BinaryPackage
.
drilldown
(
binary_packages
)
self
.
tags
=
aggregate_tags
(
tags
)
self
.
layer
=
layer
class
HarvestModel
(
BaseModel
):
...
...
This diff is collapsed.
Click to expand it.
aliens4friends/models/tinfoilhat.py
+
2
−
0
View file @
0b23574f
...
...
@@ -286,11 +286,13 @@ class Recipe(BaseModel):
metadata
:
Optional
[
RecipeMetaData
]
=
None
,
cve_metadata
:
Optional
[
RecipeCveMetaData
]
=
None
,
source_files
:
Optional
[
List
[
SourceFile
]]
=
None
,
layer
:
str
:
Optional
[
str
]
=
None
,
chk_sum
:
Optional
[
str
]
=
None
)
->
None
:
self
.
metadata
=
RecipeMetaData
.
decode
(
metadata
)
self
.
cve_metadata
=
RecipeCveMetaData
.
decode
(
cve_metadata
)
self
.
source_files
=
SourceFile
.
drilldown
(
source_files
)
self
.
layer
=
layer
self
.
chk_sum
=
chk_sum
...
...
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