Skip to content

Transferring Build Artifacts

Rohit Vighne edited this page Mar 3, 2021 · 2 revisions

Client side

  1. Prepare step: Recursively traverse the prerequisites of the given job, interpreting each job's name as a filename. Upload the named files to the server via an SFTP channel, preserving directory structure (and modification time?).
  2. Execution step: Given a job, use an SSH exec channel to trigger the remote job, handle exit status, and pipe streams.
  3. Post step: Interpret the given job's name as a filename, and use an SFTP channel to download just that file from the server.

Daemon side

  1. When a valid session is opened: create a Docker volume, and fulfill the client's SFTP requests to add files to it.
  2. Upon a job request over the same session: download the requested Docker image, then create and run a Docker container using a Make command derived from the job request's name.
  3. After the client has (or should have) downloaded the outputs: Clean up the volume. Possible approaches are: keeping it alive until it's downloaded or a timeout passes; or keeping it alive for the length of the session.

Library

Use this documentation for the ssh2 library: https://github.com/mscdex/ssh2/blob/v0.8.x/README.md

Clone this wiki locally