Commit bfc44a69 authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

Merge branch 'passthrough-oidc_user-environment-to-docker-container' into 'dev'

passthrough oidc_user environment to docker container

See merge request !72
parents 12875306 e73ae17c
Loading
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -535,9 +535,7 @@ class BaseJobRunner:
        if set_user:
            destination_info["set_host_user"] = username
        if env_var:
            if job_wrapper.job_destination.env is None:
                job_wrapper.job_destination.env = []
            job_wrapper.job_destination.env.append({'name': env_var, 'value': username})
            destination_info["pass_host_user_to_env"] = env_var + "=" + username
        return


+3 −1
Original line number Diff line number Diff line
@@ -470,7 +470,9 @@ class DockerContainer(Container, HasDockerLikeVolumes):
                run_extra_arguments = run_extra_arguments + " $GROUPADD"
            else:
                run_extra_arguments = "$GROUPADD"

        pass_host_user_to_env = self.destination_info.get("pass_host_user_to_env", None)
        if pass_host_user_to_env:
            env_directives.append(pass_host_user_to_env)
        run_command = docker_util.build_docker_run_command(
            command,
            self.container_id,