From 5f4be509189c41e10cce4de9f86279f4527b2bbe Mon Sep 17 00:00:00 2001 From: alafanechere Date: Wed, 18 Dec 2024 16:46:55 +0100 Subject: [PATCH] airbyte-ci: java build - give ownership of built artifact to the current image user --- .../connectors/pipelines/pipelines/dagger/containers/java.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte-ci/connectors/pipelines/pipelines/dagger/containers/java.py b/airbyte-ci/connectors/pipelines/pipelines/dagger/containers/java.py index 47bbe7822b21..7da129317178 100644 --- a/airbyte-ci/connectors/pipelines/pipelines/dagger/containers/java.py +++ b/airbyte-ci/connectors/pipelines/pipelines/dagger/containers/java.py @@ -182,10 +182,11 @@ async def with_airbyte_java_connector(context: ConnectorContext, connector_java_ ) base = with_integration_base_java(context, build_platform).with_entrypoint(["/airbyte/base.sh"]) + current_user = (await base.with_exec(["whoami"]).stdout()).strip() connector_container = ( base.with_workdir("/airbyte") .with_env_variable("APPLICATION", application) - .with_mounted_directory("built_artifacts", build_stage.directory("/airbyte")) + .with_mounted_directory("built_artifacts", build_stage.directory("/airbyte"), owner=current_user) .with_exec(sh_dash_c(["mv built_artifacts/* ."])) ) return await finalize_build(context, connector_container)