From 8fc93abc79eb3fa74facda7ca2e8798ff7d01658 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 18 Oct 2022 13:17:30 +0200 Subject: [PATCH] Some things are now in result-bin --- .drone.yml | 14 ++++++++------ Dockerfile | 2 +- script/test-smoke.sh | 2 +- shell.nix | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index b456a79f..c219c414 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,8 +19,9 @@ steps: - name: unit + func tests image: nixpkgs/nix:nixos-22.05 environment: - GARAGE_TEST_INTEGRATION_EXE: result/bin/garage + GARAGE_TEST_INTEGRATION_EXE: result-bin/bin/garage commands: + - nix-build --no-build-output --attr clippy.amd64 --argstr git_version ${DRONE_TAG:-$DRONE_COMMIT} - nix-build --no-build-output --attr test.amd64 - ./result/bin/garage_db-* - ./result/bin/garage_api-* @@ -31,6 +32,7 @@ steps: - ./result/bin/garage_web-* - ./result/bin/garage-* - ./result/bin/integration-* + - rm result - name: integration tests image: nixpkgs/nix:nixos-22.05 @@ -59,7 +61,7 @@ steps: image: nixpkgs/nix:nixos-22.05 commands: - nix-build --no-build-output --attr pkgs.amd64.release --argstr git_version ${DRONE_TAG:-$DRONE_COMMIT} - - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage" + - nix-shell --attr rust --run "./script/not-dynamic.sh result-bin/bin/garage" - name: integration image: nixpkgs/nix:nixos-22.05 @@ -110,7 +112,7 @@ steps: image: nixpkgs/nix:nixos-22.05 commands: - nix-build --no-build-output --attr pkgs.i386.release --argstr git_version ${DRONE_TAG:-$DRONE_COMMIT} - - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage" + - nix-shell --attr rust --run "./script/not-dynamic.sh result-bin/bin/garage" - name: integration image: nixpkgs/nix:nixos-22.05 @@ -160,7 +162,7 @@ steps: image: nixpkgs/nix:nixos-22.05 commands: - nix-build --no-build-output --attr pkgs.arm64.release --argstr git_version ${DRONE_TAG:-$DRONE_COMMIT} - - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage" + - nix-shell --attr rust --run "./script/not-dynamic.sh result-bin/bin/garage" - name: push static binary image: nixpkgs/nix:nixos-22.05 @@ -205,7 +207,7 @@ steps: image: nixpkgs/nix:nixos-22.05 commands: - nix-build --no-build-output --attr pkgs.arm.release --argstr git_version ${DRONE_TAG:-$DRONE_COMMIT} - - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage" + - nix-shell --attr rust --run "./script/not-dynamic.sh result-bin/bin/garage" - name: push static binary image: nixpkgs/nix:nixos-22.05 @@ -281,6 +283,6 @@ trigger: --- kind: signature -hmac: 90878eb81f4384a15e5dfb7f215b09c11f2f0ff804e0b34397e31d3694bdd378 +hmac: ac09a5a8c82502f67271f93afa1e1e21ce66383b8e24a6deb26b285cc1c378ba ... diff --git a/Dockerfile b/Dockerfile index 2e301ee9..62e51b32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,5 +3,5 @@ FROM scratch ENV RUST_BACKTRACE=1 ENV RUST_LOG=garage=info -COPY result/bin/garage / +COPY result-bin/bin/garage / CMD [ "/garage", "server"] diff --git a/script/test-smoke.sh b/script/test-smoke.sh index bb939d35..eababf38 100755 --- a/script/test-smoke.sh +++ b/script/test-smoke.sh @@ -8,7 +8,7 @@ SCRIPT_FOLDER="`dirname \"$0\"`" REPO_FOLDER="${SCRIPT_FOLDER}/../" GARAGE_DEBUG="${REPO_FOLDER}/target/debug/" GARAGE_RELEASE="${REPO_FOLDER}/target/release/" -NIX_RELEASE="${REPO_FOLDER}/result/bin/" +NIX_RELEASE="${REPO_FOLDER}/result/bin/:${REPO_FOLDER}/result-bin/bin/" PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:${NIX_RELEASE}:$PATH" CMDOUT=/tmp/garage.cmd.tmp diff --git a/shell.nix b/shell.nix index 36a290a9..3b98f8b1 100644 --- a/shell.nix +++ b/shell.nix @@ -71,7 +71,7 @@ function to_s3 { --endpoint-url https://garage.deuxfleurs.fr \ --region garage \ s3 cp \ - ./result/bin/garage \ + ./result-bin/bin/garage \ s3://garagehq.deuxfleurs.fr/_releases/''${DRONE_TAG:-$DRONE_COMMIT}/''${TARGET}/garage }