Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab-ci
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
SECO Northern Europe
Yocto
infrastructure
gitlab-ci
Commits
3f6e1d96
Commit
3f6e1d96
authored
3 years ago
by
Tobias Kahlki
Browse files
Options
Downloads
Patches
Plain Diff
package_release: Added option to copy licenses with release
BCS 746-000303
parent
ddbf1bd4
No related branches found
Branches containing commit
No related tags found
1 merge request
!80
package_release: Added option to copy licenses with release
Pipeline
#8688
passed with stages
in 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package_release.py
+42
-1
42 additions, 1 deletion
package_release.py
with
42 additions
and
1 deletion
package_release.py
+
42
−
1
View file @
3f6e1d96
...
...
@@ -84,6 +84,7 @@ def generate_metadata(
"""
Generates a metainfo.json for the release
"""
install_script
=
None
licenses
=
None
image_general
=
None
image_wic
=
None
...
...
@@ -100,8 +101,10 @@ def generate_metadata(
# Collect metadata and write to metainfo.json
for
artifact
in
artifacts_image
:
if
artifact
.
endswith
(
"
fng-install.sh
"
)
:
if
artifact
==
"
fng-install.sh
"
:
install_script
=
artifact
elif
artifact
==
"
license.manifest
"
:
licenses
=
artifact
elif
artifact
.
endswith
(
machine
+
"
.tar.gz
"
):
image_general
=
artifact
elif
artifact
.
endswith
(
machine
+
"
.wic
"
):
...
...
@@ -138,6 +141,12 @@ def generate_metadata(
new_file
[
"
path
"
]
=
"
sdk/
"
+
sdk
+
"
.sh
"
metadata
[
"
files
"
].
append
(
new_file
)
if
licenses
is
not
None
:
new_file
=
dict
()
new_file
[
"
name
"
]
=
"
Licenses
"
new_file
[
"
path
"
]
=
licenses
metadata
[
"
files
"
].
append
(
new_file
)
with
open
(
filepath
,
"
w
"
,
encoding
=
"
utf-8
"
)
as
file
:
file
.
write
(
json
.
dumps
(
metadata
))
...
...
@@ -149,6 +158,11 @@ def main():
help
=
"""
Yocto images directory
"""
,
dest
=
"
images_dir
"
,
)
parser
.
add_argument
(
"
--licenses-dir
"
,
help
=
"""
Yocto licenses directory
"""
,
dest
=
"
licenses_dir
"
,
)
parser
.
add_argument
(
"
--outputdir-upload
"
,
help
=
"""
Base directory name for uploaded artifacts
"""
,
...
...
@@ -247,6 +261,33 @@ def main():
artifacts_all
,
args
.
images_dir
,
machine
,
output_dir
,
outlocal_dir
)
# If the path for the licenses is set, we check for the list with all
# licenses. If the list is found, we copy it to the output directory
# and also add it to the artifacts dictionary.
if
args
.
licenses_dir
is
not
None
and
os
.
path
.
isdir
(
args
.
licenses_dir
):
licenses_dir
=
None
for
entry
in
os
.
listdir
(
args
.
licenses_dir
):
if
entry
.
startswith
(
"
guf-image-
"
):
fullpath
=
os
.
path
.
join
(
args
.
licenses_dir
,
entry
)
if
os
.
path
.
isdir
(
fullpath
):
licenses_dir
=
fullpath
break
if
licenses_dir
is
not
None
:
md5sums
.
update
(
copy_files
(
[
"
license.manifest
"
],
licenses_dir
,
machine
,
output_dir
,
outlocal_dir
,
)
)
artifacts_all
.
append
(
"
license.manifest
"
)
# Generate alphaplan FWR articles
if
args
.
generate_fwr_articles
:
alphaplan_fwr
.
generate_fwr_articles
(
...
...
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