What is the go-server artifact-dir/cache used for?




  • Avatar
    Anush Ramani

    Hi Brett,

    Whenever an agent requests an artifact from the Go server, the server zips up the artifact and sends it to the agent. The artifacts cache is where the zipped files are persisted for quicker response times.

    It should be fine to clear out the cache dir from time to time. The only thing to watch out for is that you don't want to delete an artifact that still has not been fully downloaded by an agent. You might want to do a timestamp check on each file before deleting them (don't delete any file that was created less than an hour ago).

  • Avatar
    Brett Cave

    Great, thanks Anush.

    If I re-run a pipeline instance, will the artifacts be re-zipped or will the cached zip files just be resent? If i need to retain copies of all artifacts deployed to a certain environment (e.g. ProjectPRODUCTION), i would could do so by keeping the upstream (ProjectPREPRODUCTION) cache objects?

    will be working with a time frame of a work more likely for removal of files

  • Avatar
    Anush Ramani

    The cache files are scoped by unique identifiers. If you re-run a pipeline that fetches an artifact, Go will serve up the cached copy if it exists. If you re-run a pipeline instance that generates an artifact, those artifacts will be re-zipped if an agent requests for that particular pipelines instance's artifacts.

    Go takes care of aspects caching and scoping. Whenever you request an artifact in your job, you don't have to worry about whether or not you're getting the correct artifact -- rest assured that Go will send you the correct version of the artifact.

Please sign in to leave a comment.