aboutsummaryrefslogtreecommitdiff
path: root/.drone.yml
diff options
context:
space:
mode:
authorMendes <mendes.oulamara@pm.me>2022-10-04 18:14:49 +0200
committerMendes <mendes.oulamara@pm.me>2022-10-04 18:14:49 +0200
commit829f815a897b04986559910bbcbf53625adcdf20 (patch)
tree6db3c27cff2aded754a641d1f2b05c83be701267 /.drone.yml
parent99f96b9564c9c841dc6c56f1255a6e70ff884d46 (diff)
parenta096ced35562bd0a8877a1ee2f755be1edafe343 (diff)
downloadgarage-829f815a897b04986559910bbcbf53625adcdf20.tar.gz
garage-829f815a897b04986559910bbcbf53625adcdf20.zip
Merge remote-tracking branch 'origin/main' into optimal-layout
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml355
1 files changed, 81 insertions, 274 deletions
diff --git a/.drone.yml b/.drone.yml
index 903be5b0..f5ac6179 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -2,68 +2,26 @@
kind: pipeline
name: default
-workspace:
- base: /drone/garage
-
-volumes:
-- name: nix_store
- host:
- path: /var/lib/drone/nix
-- name: nix_config
- temp: {}
-
-environment:
- HOME: /drone/garage
+node:
+ nix-daemon: 1
steps:
- - name: setup nix
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ - name: check formatting
+ image: nixpkgs/nix:nixos-22.05
commands:
- - cp nix/nix.conf /etc/nix/nix.conf
- - nix-build --no-build-output --no-out-link shell.nix --arg release false -A inputDerivation
-
- - name: code quality
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - 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"
- name: build
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
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-build --no-build-output --attr clippy.amd64 --argstr git_version ${DRONE_TAG:-$DRONE_COMMIT}
- name: unit + func tests
- image: nixpkgs/nix:nixos-21.05
+ image: nixpkgs/nix:nixos-22.05
environment:
GARAGE_TEST_INTEGRATION_EXE: result/bin/garage
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
commands:
- - |
- nix-build \
- --no-build-output \
- --option log-lines 100 \
- --argstr target x86_64-unknown-linux-musl \
- --argstr compileMode test
+ - nix-build --no-build-output --attr test.amd64
- ./result/bin/garage_api-*
- ./result/bin/garage_model-*
- ./result/bin/garage_rpc-*
@@ -73,16 +31,11 @@ steps:
- ./result/bin/garage-*
- ./result/bin/integration-*
- - name: smoke-test
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ - name: integration tests
+ image: nixpkgs/nix:nixos-22.05
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-build --no-build-output --attr clippy.amd64 --argstr git_version ${DRONE_TAG:-$DRONE_COMMIT}
+ - nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
trigger:
event:
@@ -92,78 +45,39 @@ trigger:
- tag
- cron
-node:
- nix: 1
-
---
kind: pipeline
type: docker
-name: release-linux-x86_64
-
-volumes:
-- name: nix_store
- host:
- path: /var/lib/drone/nix
-- name: nix_config
- temp: {}
+name: release-linux-amd64
-environment:
- TARGET: x86_64-unknown-linux-musl
+node:
+ nix-daemon: 1
steps:
- - name: setup nix
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
- commands:
- - cp nix/nix.conf /etc/nix/nix.conf
- - nix-build --no-build-output --no-out-link shell.nix -A inputDerivation
-
- name: build
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
commands:
- - nix-build --no-build-output --argstr target $TARGET --arg release true --argstr git_version $DRONE_COMMIT
+ - 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"
- name: integration
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
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
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
environment:
AWS_ACCESS_KEY_ID:
from_secret: garagehq_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: garagehq_aws_secret_access_key
+ TARGET: "x86_64-unknown-linux-musl"
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
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
environment:
DOCKER_AUTH:
from_secret: docker_auth
@@ -174,7 +88,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:
@@ -182,78 +96,39 @@ trigger:
- promote
- cron
-node:
- nix: 1
-
---
kind: pipeline
type: docker
-name: release-linux-i686
-
-volumes:
-- name: nix_store
- host:
- path: /var/lib/drone/nix
-- name: nix_config
- temp: {}
+name: release-linux-i386
-environment:
- TARGET: i686-unknown-linux-musl
+node:
+ nix-daemon: 1
steps:
- - name: setup nix
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
- commands:
- - cp nix/nix.conf /etc/nix/nix.conf
- - nix-build --no-build-output --no-out-link shell.nix -A inputDerivation
-
- name: build
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
commands:
- - nix-build --no-build-output --argstr target $TARGET --arg release true --argstr git_version $DRONE_COMMIT
+ - 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"
- name: integration
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
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
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
environment:
AWS_ACCESS_KEY_ID:
from_secret: garagehq_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: garagehq_aws_secret_access_key
+ TARGET: "i686-unknown-linux-musl"
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
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
environment:
DOCKER_AUTH:
from_secret: docker_auth
@@ -264,75 +139,41 @@ 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:
- promote
- cron
-node:
- nix: 1
-
---
kind: pipeline
type: docker
-name: release-linux-aarch64
-
-volumes:
-- name: nix_store
- host:
- path: /var/lib/drone/nix
-- name: nix_config
- temp: {}
+name: release-linux-arm64
-environment:
- TARGET: aarch64-unknown-linux-musl
+node:
+ nix-daemon: 1
steps:
- - name: setup nix
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- 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
-
- name: build
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
commands:
- - nix-build --no-build-output --argstr target $TARGET --arg release true --argstr git_version $DRONE_COMMIT
+ - 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"
- name: push static binary
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
environment:
AWS_ACCESS_KEY_ID:
from_secret: garagehq_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: garagehq_aws_secret_access_key
+ TARGET: "aarch64-unknown-linux-musl"
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
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
environment:
DOCKER_AUTH:
from_secret: docker_auth
@@ -343,75 +184,41 @@ 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:
- promote
- cron
-node:
- nix: 1
-
---
kind: pipeline
type: docker
-name: release-linux-armv6l
+name: release-linux-arm
-volumes:
-- name: nix_store
- host:
- path: /var/lib/drone/nix
-- name: nix_config
- temp: {}
-
-environment:
- TARGET: armv6l-unknown-linux-musleabihf
+node:
+ nix-daemon: 1
steps:
- - name: setup nix
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- 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
-
- name: build
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
commands:
- - nix-build --no-build-output --argstr target $TARGET --arg release true --argstr git_version $DRONE_COMMIT
+ - 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"
- name: push static binary
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
environment:
AWS_ACCESS_KEY_ID:
from_secret: garagehq_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: garagehq_aws_secret_access_key
+ TARGET: "armv6l-unknown-linux-musleabihf"
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
- volumes:
- - name: nix_store
- path: /nix
- - name: nix_config
- path: /etc/nix
+ image: nixpkgs/nix:nixos-22.05
environment:
DOCKER_AUTH:
from_secret: docker_auth
@@ -422,32 +229,35 @@ 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:
- promote
- cron
-node:
- nix: 1
-
---
kind: pipeline
type: docker
name: refresh-release-page
-volumes:
-- name: nix_store
- host:
- path: /var/lib/drone/nix
+node:
+ nix-daemon: 1
steps:
+ - name: multiarch-docker
+ image: nixpkgs/nix:nixos-22.05
+ environment:
+ DOCKER_AUTH:
+ from_secret: docker_auth
+ HOME: "/root"
+ commands:
+ - mkdir -p /root/.docker
+ - echo $DOCKER_AUTH > /root/.docker/config.json
+ - export CONTAINER_TAG=${DRONE_TAG:-$DRONE_COMMIT}
+ - nix-shell --attr release --run "multiarch_docker"
- name: refresh-index
- image: nixpkgs/nix:nixos-21.05
- volumes:
- - name: nix_store
- path: /nix
+ image: nixpkgs/nix:nixos-22.05
environment:
AWS_ACCESS_KEY_ID:
from_secret: garagehq_aws_access_key_id
@@ -455,24 +265,21 @@ 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
- - release-linux-i686
- - release-linux-aarch64
- - release-linux-armv6l
+ - release-linux-amd64
+ - release-linux-i386
+ - release-linux-arm64
+ - release-linux-arm
trigger:
event:
- promote
- cron
-node:
- nix: 1
-
---
kind: signature
-hmac: 3fc19d6f9a3555519c8405e3281b2e74289bb802f644740d5481d53df3a01fa4
+hmac: 103a04785c98f5376a63ce22865c2576963019bbc4d828f200d2a470a3c821ea
...