aboutsummaryrefslogtreecommitdiff
path: root/.drone.yml
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-07-20 14:44:30 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-07-26 18:27:46 +0200
commit76cb34a0ae716173d9bed6d6dcb53903762255a8 (patch)
tree0e41ee523896bd52453199675d16f2e696d28d19 /.drone.yml
parentac03fa7937d9da29d2358343a499fe9d15ac5f7c (diff)
downloadgarage-76cb34a0ae716173d9bed6d6dcb53903762255a8.tar.gz
garage-76cb34a0ae716173d9bed6d6dcb53903762255a8.zip
Fail if compiled binary is dynamic
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml45
1 files changed, 25 insertions, 20 deletions
diff --git a/.drone.yml b/.drone.yml
index 903be5b0..01adc278 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -25,7 +25,7 @@ steps:
path: /etc/nix
commands:
- cp nix/nix.conf /etc/nix/nix.conf
- - nix-build --no-build-output --no-out-link shell.nix --arg release false -A inputDerivation
+ - nix-build --no-build-output --no-out-link shell.nix -A rust.inputDerivation -A integration.inputDerivation -A release.inputDerivation
- name: code quality
image: nixpkgs/nix:nixos-21.05
@@ -35,8 +35,8 @@ steps:
- name: nix_config
path: /etc/nix
commands:
- - nix-shell --arg release false --run "cargo fmt -- --check"
- - nix-shell --arg release false --run "cargo clippy -- --deny warnings"
+ - nix-shell --attr rust --run "cargo fmt -- --check"
+ - nix-shell --attr rust --run "cargo clippy -- --deny warnings"
- name: build
image: nixpkgs/nix:nixos-21.05
@@ -47,6 +47,7 @@ steps:
path: /etc/nix
commands:
- nix-build --no-build-output --option log-lines 100 --argstr target x86_64-unknown-linux-musl --arg release false --argstr git_version $DRONE_COMMIT
+ - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage"
- name: unit + func tests
image: nixpkgs/nix:nixos-21.05
@@ -82,7 +83,7 @@ steps:
path: /etc/nix
commands:
- nix-build --no-build-output --argstr target x86_64-unknown-linux-musl --arg release false --argstr git_version $DRONE_COMMIT
- - nix-shell --arg release false --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
+ - nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
trigger:
event:
@@ -120,7 +121,7 @@ steps:
path: /etc/nix
commands:
- cp nix/nix.conf /etc/nix/nix.conf
- - nix-build --no-build-output --no-out-link shell.nix -A inputDerivation
+ - nix-build --no-build-output --no-out-link shell.nix -A rust.inputDerivation -A integration.inputDerivation -A release.inputDerivation
- name: build
image: nixpkgs/nix:nixos-21.05
@@ -131,6 +132,7 @@ steps:
path: /etc/nix
commands:
- nix-build --no-build-output --argstr target $TARGET --arg release true --argstr git_version $DRONE_COMMIT
+ - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage"
- name: integration
image: nixpkgs/nix:nixos-21.05
@@ -140,7 +142,7 @@ steps:
- name: nix_config
path: /etc/nix
commands:
- - nix-shell --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
+ - nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
- name: push static binary
image: nixpkgs/nix:nixos-21.05
@@ -155,7 +157,7 @@ steps:
AWS_SECRET_ACCESS_KEY:
from_secret: garagehq_aws_secret_access_key
commands:
- - nix-shell --arg rust false --arg integration false --run "to_s3"
+ - nix-shell --attr release --run "to_s3"
- name: docker build and publish
image: nixpkgs/nix:nixos-21.05
@@ -174,7 +176,7 @@ steps:
- mkdir -p /kaniko/.docker
- echo $DOCKER_AUTH > /kaniko/.docker/config.json
- export CONTAINER_TAG=${DRONE_TAG:-$DRONE_COMMIT}
- - nix-shell --arg rust false --arg integration false --run "to_docker"
+ - nix-shell --attr release --run "to_docker"
trigger:
@@ -210,7 +212,7 @@ steps:
path: /etc/nix
commands:
- cp nix/nix.conf /etc/nix/nix.conf
- - nix-build --no-build-output --no-out-link shell.nix -A inputDerivation
+ - nix-build --no-build-output --no-out-link shell.nix -A rust.inputDerivation -A integration.inputDerivation -A release.inputDerivation
- name: build
image: nixpkgs/nix:nixos-21.05
@@ -221,6 +223,7 @@ steps:
path: /etc/nix
commands:
- nix-build --no-build-output --argstr target $TARGET --arg release true --argstr git_version $DRONE_COMMIT
+ - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage"
- name: integration
image: nixpkgs/nix:nixos-21.05
@@ -230,7 +233,7 @@ steps:
- name: nix_config
path: /etc/nix
commands:
- - nix-shell --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
+ - nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
- name: push static binary
image: nixpkgs/nix:nixos-21.05
@@ -245,7 +248,7 @@ steps:
AWS_SECRET_ACCESS_KEY:
from_secret: garagehq_aws_secret_access_key
commands:
- - nix-shell --arg rust false --arg integration false --run "to_s3"
+ - nix-shell --attr release --run "to_s3"
- name: docker build and publish
image: nixpkgs/nix:nixos-21.05
@@ -264,7 +267,7 @@ steps:
- mkdir -p /kaniko/.docker
- echo $DOCKER_AUTH > /kaniko/.docker/config.json
- export CONTAINER_TAG=${DRONE_TAG:-$DRONE_COMMIT}
- - nix-shell --arg rust false --arg integration false --run "to_docker"
+ - nix-shell --attr release --run "to_docker"
trigger:
event:
@@ -299,7 +302,7 @@ steps:
path: /etc/nix
commands:
- cp nix/nix.conf /etc/nix/nix.conf
- - nix-build --no-build-output --no-out-link ./shell.nix --arg rust false --arg integration false -A inputDerivation
+ - nix-build --no-build-output --no-out-link shell.nix -A rust.inputDerivation -A integration.inputDerivation -A release.inputDerivation
- name: build
image: nixpkgs/nix:nixos-21.05
@@ -310,6 +313,7 @@ steps:
path: /etc/nix
commands:
- nix-build --no-build-output --argstr target $TARGET --arg release true --argstr git_version $DRONE_COMMIT
+ - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage"
- name: push static binary
image: nixpkgs/nix:nixos-21.05
@@ -324,7 +328,7 @@ steps:
AWS_SECRET_ACCESS_KEY:
from_secret: garagehq_aws_secret_access_key
commands:
- - nix-shell --arg rust false --arg integration false --run "to_s3"
+ - nix-shell --attr release --run "to_s3"
- name: docker build and publish
image: nixpkgs/nix:nixos-21.05
@@ -343,7 +347,7 @@ steps:
- mkdir -p /kaniko/.docker
- echo $DOCKER_AUTH > /kaniko/.docker/config.json
- export CONTAINER_TAG=${DRONE_TAG:-$DRONE_COMMIT}
- - nix-shell --arg rust false --arg integration false --run "to_docker"
+ - nix-shell --attr release --run "to_docker"
trigger:
event:
@@ -378,7 +382,7 @@ steps:
path: /etc/nix
commands:
- cp nix/nix.conf /etc/nix/nix.conf
- - nix-build --no-build-output --no-out-link --arg rust false --arg integration false -A inputDerivation
+ - nix-build --no-build-output --no-out-link shell.nix -A rust.inputDerivation -A integration.inputDerivation -A release.inputDerivation
- name: build
image: nixpkgs/nix:nixos-21.05
@@ -389,6 +393,7 @@ steps:
path: /etc/nix
commands:
- nix-build --no-build-output --argstr target $TARGET --arg release true --argstr git_version $DRONE_COMMIT
+ - nix-shell --attr rust --run "./script/not-dynamic.sh result/bin/garage"
- name: push static binary
image: nixpkgs/nix:nixos-21.05
@@ -403,7 +408,7 @@ steps:
AWS_SECRET_ACCESS_KEY:
from_secret: garagehq_aws_secret_access_key
commands:
- - nix-shell --arg integration false --arg rust false --run "to_s3"
+ - nix-shell --attr release --run "to_s3"
- name: docker build and publish
image: nixpkgs/nix:nixos-21.05
@@ -422,7 +427,7 @@ steps:
- mkdir -p /kaniko/.docker
- echo $DOCKER_AUTH > /kaniko/.docker/config.json
- export CONTAINER_TAG=${DRONE_TAG:-$DRONE_COMMIT}
- - nix-shell --arg rust false --arg integration false --run "to_docker"
+ - nix-shell --attr release --run "to_docker"
trigger:
event:
@@ -455,7 +460,7 @@ steps:
from_secret: garagehq_aws_secret_access_key
commands:
- mkdir -p /etc/nix && cp nix/nix.conf /etc/nix/nix.conf
- - nix-shell --arg integration false --arg rust false --run "refresh_index"
+ - nix-shell --attr release --run "refresh_index"
depends_on:
- release-linux-x86_64
@@ -473,6 +478,6 @@ node:
---
kind: signature
-hmac: 3fc19d6f9a3555519c8405e3281b2e74289bb802f644740d5481d53df3a01fa4
+hmac: 60fad5d78c12616be848aae35703f250300abab5f2eda08eb48fe3afd6cc58c8
...