Skip to content
Snippets Groups Projects
Commit 34d7f9b9 authored by Zygmunt Krynicki's avatar Zygmunt Krynicki Committed by Stefan Schmidt
Browse files

.oniro-ci: find DEPLOY_DIR, not TMPDIR


Some jobs care about images and licenses, those look at the
$TMPDIR/deploy, taking some effort to find the correct tmpdir while
hard-coding the deploy dir. Take a shortcut and query for the right
variable (DEPLOY_DIR).

This allows non-trivial layouts with DEPLOY_DIR and TMPDIR placed on
distinct filesystems, for efficiency.

Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 9063493f
No related branches found
No related tags found
1 merge request!209.oniro-ci: find DEPLOY_DIR, not TMPDIR
...@@ -265,22 +265,21 @@ ...@@ -265,22 +265,21 @@
# subdirectories. # subdirectories.
- mkdir -p "$CI_PROJECT_DIR"/artifacts - mkdir -p "$CI_PROJECT_DIR"/artifacts
- rm -rf "$CI_PROJECT_DIR"/artifacts/* - rm -rf "$CI_PROJECT_DIR"/artifacts/*
# The name of the build-specific tmp directory may vary. Ask bitbake # The name of the build-specific deploy dir may vary. Ask bitbake instead
# instead of hard-coding it. This is currently only relevant for Zephyr, # of hard-coding it.
# which uses tmp-newlib. - eval "$(bitbake -e | grep ^DEPLOY_DIR= | sed -e 's/^DEPLOY_DIR/BITBAKE_DEPLOY_DIR/g')"
- eval "$(bitbake -e | grep ^TMPDIR= | sed -e 's/^TMPDIR/BITBAKE_TMPDIR/g')"
# Uncompressed wic image is not needed in CI. We cannot remove it from # Uncompressed wic image is not needed in CI. We cannot remove it from
# meta-oniro-core/classes/oniro-image.bbclass as runqemu needs it for local # meta-oniro-core/classes/oniro-image.bbclass as runqemu needs it for local
# build and boot. # build and boot.
- find "$BITBAKE_TMPDIR"/deploy/images/ -name *.wic -exec rm -rf {} \; - find "$BITBAKE_DEPLOY_DIR"/images/ -name *.wic -exec rm -rf {} \;
- cp -a "$BITBAKE_TMPDIR"/deploy/licenses/ "$CI_PROJECT_DIR"/artifacts || true - cp -a "$BITBAKE_DEPLOY_DIR"/licenses/ "$CI_PROJECT_DIR"/artifacts || true
# Only copy the files defined in the CI_ONIRO_JOB_ARTIFACTS variable. Most # Only copy the files defined in the CI_ONIRO_JOB_ARTIFACTS variable. Most
# of the remaining files are redundant and quite large. # of the remaining files are redundant and quite large.
- | - |
set -x set -x
if test -n "$CI_ONIRO_JOB_ARTIFACTS" && test -d "$BITBAKE_TMPDIR"/deploy/; then if test -n "$CI_ONIRO_JOB_ARTIFACTS" && test -d "$BITBAKE_DEPLOY_DIR"; then
( (
cd "$BITBAKE_TMPDIR"/deploy/ cd "$BITBAKE_DEPLOY_DIR"
for artifact in $CI_ONIRO_JOB_ARTIFACTS; do for artifact in $CI_ONIRO_JOB_ARTIFACTS; do
find ./ \( -type f -o -type l \) -name "$artifact" -exec cp --verbose --archive --parents {} "$CI_PROJECT_DIR"/artifacts \; find ./ \( -type f -o -type l \) -name "$artifact" -exec cp --verbose --archive --parents {} "$CI_PROJECT_DIR"/artifacts \;
done done
......
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