~bigbes/tarantool

tarantool-protobuf

55f0c318230172882b5b8b2bcb7460f69578c406 — Eugene Blikh 2 months ago 55b5386
ci: cache pinned just release in Garage S3 (just/ prefix)

just.systems/install.sh downloads the just binary from
github.com/casey/just/releases/, which 502'd on #136. Same pattern as
go: pin JUST_VERSION=1.51.0, cache the release tarball, fall back to
GitHub on cache miss with --retry 3 --max-time 60. As a bonus the
version is now pinned (was floating-latest before).

S3 key: s3://docker-cache/just/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz

Pre-seeded the 1.51.0 tarball into S3 manually so the first run hits
cache immediately.
3 files changed, 57 insertions(+), 6 deletions(-)

M .builds/c-enabled.yml
M .builds/conformance.yml
M .builds/pure-lua.yml
M .builds/c-enabled.yml => .builds/c-enabled.yml +19 -2
@@ 77,9 77,26 @@ tasks:
      curl -L https://tarantool.io/release/3/installer.sh | sudo bash
      sudo apt-get install -y tarantool tarantool-dev tt
  - install_just: |
      JUST_VERSION=1.51.0
      JUST_TARBALL="just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz"
      JUST_KEY="just/$JUST_TARBALL"
      JUST_URI="s3://$S3_BUCKET/$JUST_KEY"
      mkdir -p ~/.local/bin
      curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh \
        | bash -s -- --to ~/.local/bin
      if aws --endpoint-url="$AWS_ENDPOINT_URL" s3api head-object \
           --bucket "$S3_BUCKET" --key "$JUST_KEY" >/dev/null 2>&1; then
        echo "Cache HIT — pulling just from S3"
        aws --endpoint-url="$AWS_ENDPOINT_URL" s3 cp "$JUST_URI" - \
          | tar -xz -C ~/.local/bin just
      else
        echo "Cache MISS — downloading from github and caching"
        curl -sSL --retry 3 --retry-delay 5 --max-time 60 \
          "https://github.com/casey/just/releases/download/${JUST_VERSION}/${JUST_TARBALL}" \
          -o "/tmp/$JUST_TARBALL"
        tar -xz -C ~/.local/bin -f "/tmp/$JUST_TARBALL" just
        aws --endpoint-url="$AWS_ENDPOINT_URL" s3 cp "/tmp/$JUST_TARBALL" "$JUST_URI"
        rm "/tmp/$JUST_TARBALL"
      fi
      just --version
  - install_luatest: |
      cd tarantool-protobuf
      tt rocks install luatest

M .builds/conformance.yml => .builds/conformance.yml +19 -2
@@ 91,9 91,26 @@ tasks:
      curl -L https://tarantool.io/release/3/installer.sh | sudo bash
      sudo apt-get install -y tarantool tarantool-dev tt
  - install_just: |
      JUST_VERSION=1.51.0
      JUST_TARBALL="just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz"
      JUST_KEY="just/$JUST_TARBALL"
      JUST_URI="s3://$S3_BUCKET/$JUST_KEY"
      mkdir -p ~/.local/bin
      curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh \
        | bash -s -- --to ~/.local/bin
      if aws --endpoint-url="$AWS_ENDPOINT_URL" s3api head-object \
           --bucket "$S3_BUCKET" --key "$JUST_KEY" >/dev/null 2>&1; then
        echo "Cache HIT — pulling just from S3"
        aws --endpoint-url="$AWS_ENDPOINT_URL" s3 cp "$JUST_URI" - \
          | tar -xz -C ~/.local/bin just
      else
        echo "Cache MISS — downloading from github and caching"
        curl -sSL --retry 3 --retry-delay 5 --max-time 60 \
          "https://github.com/casey/just/releases/download/${JUST_VERSION}/${JUST_TARBALL}" \
          -o "/tmp/$JUST_TARBALL"
        tar -xz -C ~/.local/bin -f "/tmp/$JUST_TARBALL" just
        aws --endpoint-url="$AWS_ENDPOINT_URL" s3 cp "/tmp/$JUST_TARBALL" "$JUST_URI"
        rm "/tmp/$JUST_TARBALL"
      fi
      just --version
  - install_luatest: |
      cd tarantool-protobuf
      tt rocks install luatest

M .builds/pure-lua.yml => .builds/pure-lua.yml +19 -2
@@ 76,9 76,26 @@ tasks:
      curl -L https://tarantool.io/release/3/installer.sh | sudo bash
      sudo apt-get install -y tarantool tarantool-dev tt
  - install_just: |
      JUST_VERSION=1.51.0
      JUST_TARBALL="just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz"
      JUST_KEY="just/$JUST_TARBALL"
      JUST_URI="s3://$S3_BUCKET/$JUST_KEY"
      mkdir -p ~/.local/bin
      curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh \
        | bash -s -- --to ~/.local/bin
      if aws --endpoint-url="$AWS_ENDPOINT_URL" s3api head-object \
           --bucket "$S3_BUCKET" --key "$JUST_KEY" >/dev/null 2>&1; then
        echo "Cache HIT — pulling just from S3"
        aws --endpoint-url="$AWS_ENDPOINT_URL" s3 cp "$JUST_URI" - \
          | tar -xz -C ~/.local/bin just
      else
        echo "Cache MISS — downloading from github and caching"
        curl -sSL --retry 3 --retry-delay 5 --max-time 60 \
          "https://github.com/casey/just/releases/download/${JUST_VERSION}/${JUST_TARBALL}" \
          -o "/tmp/$JUST_TARBALL"
        tar -xz -C ~/.local/bin -f "/tmp/$JUST_TARBALL" just
        aws --endpoint-url="$AWS_ENDPOINT_URL" s3 cp "/tmp/$JUST_TARBALL" "$JUST_URI"
        rm "/tmp/$JUST_TARBALL"
      fi
      just --version
  - install_luatest: |
      cd tarantool-protobuf
      tt rocks install luatest