[Notes] [Git][BuildGrid/buildgrid][juerg/buildbox-env] buildbox.py: Set environment variables specified in request



Title: GitLab

Jürg Billeter pushed to branch juerg/buildbox-env at BuildGrid / buildgrid

Commits:

1 changed file:

Changes:

  • buildgrid/_app/bots/buildbox.py
    ... ... @@ -46,11 +46,6 @@ def work_buildbox(context, lease):
    46 46
             command = downloader.get_message(action.command_digest,
    
    47 47
                                              remote_execution_pb2.Command())
    
    48 48
     
    
    49
    -    environment = {}
    
    50
    -    for variable in command.environment_variables:
    
    51
    -        if variable.name not in ['PWD']:
    
    52
    -            environment[variable.name] = variable.value
    
    53
    -
    
    54 49
         if command.working_directory:
    
    55 50
             working_directory = command.working_directory
    
    56 51
         else:
    
    ... ... @@ -82,6 +77,12 @@ def work_buildbox(context, lease):
    82 77
                 if context.cas_server_cert:
    
    83 78
                     command_line.append('--server-cert={}'.format(context.cas_server_cert))
    
    84 79
     
    
    80
    +            command_line.append('--clearenv')
    
    81
    +            for variable in command.environment_variables:
    
    82
    +                command_line.append('--setenv')
    
    83
    +                command_line.append(variable.name)
    
    84
    +                command_line.append(variable.value)
    
    85
    +
    
    85 86
                 command_line.append(context.fuse_dir)
    
    86 87
                 command_line.extend(command.arguments)
    
    87 88
     
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]