Skip to content
Snippets Groups Projects

.oniro-ci: find DEPLOY_DIR, not TMPDIR

Merged Zygmunt Krynicki requested to merge zyga/oniro:tweak/deploy-dir into kirkstone
1 unresolved thread
1 file
+ 7
8
Compare changes
  • Side-by-side
  • Inline
@@ -265,22 +265,21 @@
# subdirectories.
- mkdir -p "$CI_PROJECT_DIR"/artifacts
- rm -rf "$CI_PROJECT_DIR"/artifacts/*
# The name of the build-specific tmp directory may vary. Ask bitbake
# instead of hard-coding it. This is currently only relevant for Zephyr,
# which uses tmp-newlib.
- eval "$(bitbake -e | grep ^TMPDIR= | sed -e 's/^TMPDIR/BITBAKE_TMPDIR/g')"
# The name of the build-specific deploy dir may vary. Ask bitbake instead
# of hard-coding it.
- eval "$(bitbake -e | grep ^DEPLOY_DIR= | sed -e 's/^DEPLOY_DIR/BITBAKE_DEPLOY_DIR/g')"
# 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
# build and boot.
- find "$BITBAKE_TMPDIR"/deploy/images/ -name *.wic -exec rm -rf {} \;
- cp -a "$BITBAKE_TMPDIR"/deploy/licenses/ "$CI_PROJECT_DIR"/artifacts || true
- find "$BITBAKE_DEPLOY_DIR"/images/ -name *.wic -exec rm -rf {} \;
- cp -a "$BITBAKE_DEPLOY_DIR"/licenses/ "$CI_PROJECT_DIR"/artifacts || true
# Only copy the files defined in the CI_ONIRO_JOB_ARTIFACTS variable. Most
# of the remaining files are redundant and quite large.
- |
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
find ./ \( -type f -o -type l \) -name "$artifact" -exec cp --verbose --archive --parents {} "$CI_PROJECT_DIR"/artifacts \;
done
Loading