Skip to content
Snippets Groups Projects
Commit 543a2170 authored by Tim Jaacks's avatar Tim Jaacks
Browse files

manifest_package: add release suffix

Customer specific manifest projects can now set the RELEASE_SUFFIX
variable, which then gets appended to the deployment folder names.
parent c763c43f
No related branches found
No related tags found
1 merge request!215manifest_package: add release suffix
Pipeline #32875 passed with stage
in 24 minutes and 28 seconds
......@@ -45,6 +45,7 @@
echo "${LOGPREFIX} ARTIFACTS_LICENSES_PATH=$ARTIFACTS_LICENSES_PATH"
echo "${LOGPREFIX} ARTIFACTS_SDK_PATH=$ARTIFACTS_SDK_PATH"
echo "${LOGPREFIX} UPLOAD_PARAM=$UPLOAD_PARAM"
echo "${LOGPREFIX} RELEASE_SUFFIX=$RELEASE_SUFFIX"
echo "${LOGPREFIX} outdir=$outdir"
# Check if the package_release script is available
......@@ -65,6 +66,7 @@
--licenses-dir="${ARTIFACTS_LICENSES_PATH}" \
--doc-dir=. \
--output-dir=${outdir} \
--release-suffix="${RELEASE_SUFFIX}" \
$UPLOAD_PARAM
else
echo "${LOGPREFIX} No image found"
......@@ -76,7 +78,8 @@
echo "${LOGPREFIX} SDK dir found, execute ${script}"
${script} \
--sdk-dir=${ARTIFACTS_SDK_PATH} \
--output-dir="${outdir}"
--output-dir="${outdir}" \
--release-suffix="${RELEASE_SUFFIX}"
else
echo "${LOGPREFIX} No SDK found"
fi
......@@ -99,7 +102,8 @@
${apscript} \
--images-dir="${ARTIFACTS_IMAGE_PATH}" \
--outputdir-local=${outdir} \
--outputdir-upload=release
--outputdir-upload=release \
--release-suffix="${RELEASE_SUFFIX}"
else
echo "${LOGPREFIX} No AlphaPlan FWR articles need to be generated"
fi
......@@ -284,6 +284,11 @@ def main():
help="""Base directory for locally deployed artifacts, should contain absolut path.""",
dest="outputdir_local",
)
parser.add_argument(
"--release-suffix",
help="""Suffix to append to the release folder""",
dest="release_suffix",
)
args, _ = parser.parse_known_args()
if args.outputdir_upload is None or args.outputdir_local is None:
......@@ -302,11 +307,16 @@ def main():
artifacts_all = buildvars["DISTRO_RELEASE_ARTEFACTS"].split()
artifacts_all.append("BUILD_SRCREVS.log")
# Set release name
if version.startswith("fngsystem"):
release_name = version.replace("fngsystem", "FNGSystem")
else:
release_name = "Yocto-%s" % version
# Append release suffix
if args.release_suffix is not None:
release_name = release_name + args.release_suffix
output_dir = os.path.join(args.outputdir_upload, release_name)
outlocal_dir = os.path.join(args.outputdir_local, release_name)
if not os.path.isdir(outlocal_dir):
......
......@@ -83,6 +83,11 @@ def main():
action="append",
required=True,
)
parser.add_argument(
"--release-suffix",
help="""Suffix to append to the release folder""",
dest="release_suffix",
)
args, _ = parser.parse_known_args()
# Get bitbake variables from testdata.json file
......@@ -122,6 +127,10 @@ def main():
else:
release_name = "Yocto-%s" % version
# Append release suffix
if args.release_suffix is not None:
release_name = release_name + args.release_suffix
# Create output directories
output_dirs = []
for output_dir in args.output_dir:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment