diff --git a/.oniro-ci/build-generic.yaml b/.oniro-ci/build-generic.yaml index bc79cda5c415bd0051c68e905e9380a935f8997b..927bf4231e096ba9ad10e0f88ca5920df2ecd8c6 100644 --- a/.oniro-ci/build-generic.yaml +++ b/.oniro-ci/build-generic.yaml @@ -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