nienbo / cache-buildkite-plugin

Tarball, Rsync & S3 Cache Kit for Buildkite. Supports Linux, macOS and Windows
https://buildkite.com/plugins
MIT License
67 stars 39 forks source link

How to run it in docker? #17

Closed jorgecarleitao closed 3 years ago

jorgecarleitao commented 3 years ago

Consider the following step:

steps:
  - label: Build
    plugins:
    - gencer/cache#v2.3.6:
        backend: tarball
        key: "v1-cache-{{ runner.os }}-{{ checksum 'rust/Cargo.toml' }}"
        tarball:
          path: '/tmp/buildkite-cache-rust'
          max: 7
          compress: true
        paths:
          - '.cargo'
          - 'target'
    - docker#v3.2.0:
        image: amd64/rust
    command: |
      rustup toolchain install stable
      rustup default stable
      rustup component add rustfmt 

      export CARGO_HOME="$PWD/.cargo"
      export CARGO_TARGET_DIR="$PWD/target"
      cargo build

I am getting

~~~ Running plugin cache pre-command hook
$ /usr/local/var/buildkite-agent/plugins/github-com-gencer-cache-buildkite-plugin-v2-3-6/hooks/pre-command
~~~ :bash: Cache Buildkite Plugin v2.3.6

🔍 Looking for v1-cache-macOS-090a069aa27940db9c0f7afcd20b33393f432de3

🚨 Error: The plugin cache pre-command hook exited with status 1
^^^ +++

Any ideas what is causing the status 1?

gencer commented 3 years ago

@jorgecarleitao I assume you've already found the answer? Let me know if you need anything.

jorgecarleitao commented 3 years ago

I actually haven't: I thought I did, but still does not work xD I have no idea why, though: exit status 1 is pretty generic and I was unable to find what could have been causing this yet.

gencer commented 3 years ago

I've found the issue. Releasing v2.3.7 in few minutes. Stay tuned. I'll update here once its ready.

gencer commented 3 years ago

Could you please try v2.3.7 now?

jorgecarleitao commented 3 years ago

@gencer , I am closing this as solved in v2.3.7. Amazing response time and fix 🥇 . Thanks a lot!