mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-25 17:41:01 +00:00
Migrate to nix-daemon builders
This commit is contained in:
parent
fcb04843f7
commit
a184f0d0b5
1 changed files with 13 additions and 194 deletions
207
.drone.yml
207
.drone.yml
|
@ -2,49 +2,17 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
workspace:
|
node:
|
||||||
base: /drone/garage
|
nix-daemon: 1
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
host:
|
|
||||||
path: /var/lib/drone/nix
|
|
||||||
- name: nix_config
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
environment:
|
|
||||||
HOME: /drone/garage
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: nix maintenance
|
|
||||||
image: nixpkgs/nix:nixos-22.05
|
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /mnt
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
|
||||||
- "[ -d /mnt/store/3vpyn2qz5ay057nq9x68sh0r328d77ng-nix-2.8.1/ ] || (mkdir -p /mnt/store && cp -r /nix/store/* /mnt/store/)"
|
|
||||||
- "[ -d /mnt/var/ ] || cp -r /nix/var /mnt/"
|
|
||||||
- cp nix/nix.conf /etc/nix/nix.conf
|
|
||||||
|
|
||||||
- name: check formatting
|
- name: check formatting
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-shell --attr rust --run "cargo fmt -- --check"
|
- nix-shell --attr rust --run "cargo fmt -- --check"
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-build --no-build-output --attr clippy.amd64 --argstr git_version $DRONE_COMMIT
|
- nix-build --no-build-output --attr clippy.amd64 --argstr git_version $DRONE_COMMIT
|
||||||
|
|
||||||
|
@ -52,11 +20,6 @@ steps:
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
environment:
|
environment:
|
||||||
GARAGE_TEST_INTEGRATION_EXE: result/bin/garage
|
GARAGE_TEST_INTEGRATION_EXE: result/bin/garage
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-build --no-build-output --attr test.amd64
|
- nix-build --no-build-output --attr test.amd64
|
||||||
- ./result/bin/garage_api-*
|
- ./result/bin/garage_api-*
|
||||||
|
@ -70,11 +33,6 @@ steps:
|
||||||
|
|
||||||
- name: integration tests
|
- name: integration tests
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-build --no-build-output --attr clippy.amd64 --argstr git_version $DRONE_COMMIT
|
- nix-build --no-build-output --attr clippy.amd64 --argstr git_version $DRONE_COMMIT
|
||||||
- nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
|
- nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
|
||||||
|
@ -92,54 +50,23 @@ kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: release-linux-amd64
|
name: release-linux-amd64
|
||||||
|
|
||||||
volumes:
|
node:
|
||||||
- name: nix_store
|
nix-daemon: 1
|
||||||
host:
|
|
||||||
path: /var/lib/drone/nix
|
|
||||||
- name: nix_config
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: nix maintenance
|
|
||||||
image: nixpkgs/nix:nixos-22.05
|
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /mnt
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
|
||||||
- "[ -d /mnt/store/3vpyn2qz5ay057nq9x68sh0r328d77ng-nix-2.8.1/ ] || (mkdir -p /mnt/store && cp -r /nix/store/* /mnt/store/)"
|
|
||||||
- "[ -d /mnt/var/ ] || cp -r /nix/var /mnt/"
|
|
||||||
- cp nix/nix.conf /etc/nix/nix.conf
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-build --no-build-output --attr pkgs.amd64.release --argstr git_version $DRONE_COMMIT
|
- nix-build --no-build-output --attr pkgs.amd64.release --argstr git_version $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/garage"
|
||||||
|
|
||||||
- name: integration
|
- name: integration
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-shell --attr integration --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
|
- name: push static binary
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: garagehq_aws_access_key_id
|
from_secret: garagehq_aws_access_key_id
|
||||||
|
@ -150,11 +77,6 @@ steps:
|
||||||
|
|
||||||
- name: docker build and publish
|
- name: docker build and publish
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
environment:
|
environment:
|
||||||
DOCKER_AUTH:
|
DOCKER_AUTH:
|
||||||
from_secret: docker_auth
|
from_secret: docker_auth
|
||||||
|
@ -178,54 +100,23 @@ kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: release-linux-i386
|
name: release-linux-i386
|
||||||
|
|
||||||
volumes:
|
node:
|
||||||
- name: nix_store
|
nix-daemon: 1
|
||||||
host:
|
|
||||||
path: /var/lib/drone/nix
|
|
||||||
- name: nix_config
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: nix maintenance
|
|
||||||
image: nixpkgs/nix:nixos-22.05
|
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /mnt
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
|
||||||
- "[ -d /mnt/store/3vpyn2qz5ay057nq9x68sh0r328d77ng-nix-2.8.1/ ] || (mkdir -p /mnt/store && cp -r /nix/store/* /mnt/store/)"
|
|
||||||
- "[ -d /mnt/var/ ] || cp -r /nix/var /mnt/"
|
|
||||||
- cp nix/nix.conf /etc/nix/nix.conf
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-build --no-build-output --attr pkgs.i386.release --argstr git_version $DRONE_COMMIT
|
- nix-build --no-build-output --attr pkgs.i386.release --argstr git_version $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/garage"
|
||||||
|
|
||||||
- name: integration
|
- name: integration
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-shell --attr integration --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
|
- name: push static binary
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: garagehq_aws_access_key_id
|
from_secret: garagehq_aws_access_key_id
|
||||||
|
@ -236,11 +127,6 @@ steps:
|
||||||
|
|
||||||
- name: docker build and publish
|
- name: docker build and publish
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
environment:
|
environment:
|
||||||
DOCKER_AUTH:
|
DOCKER_AUTH:
|
||||||
from_secret: docker_auth
|
from_secret: docker_auth
|
||||||
|
@ -263,44 +149,18 @@ kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: release-linux-arm64
|
name: release-linux-arm64
|
||||||
|
|
||||||
volumes:
|
node:
|
||||||
- name: nix_store
|
nix-daemon: 1
|
||||||
host:
|
|
||||||
path: /var/lib/drone/nix
|
|
||||||
- name: nix_config
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: nix maintenance
|
|
||||||
image: nixpkgs/nix:nixos-22.05
|
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /mnt
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
|
||||||
- "[ -d /mnt/store/3vpyn2qz5ay057nq9x68sh0r328d77ng-nix-2.8.1/ ] || (mkdir -p /mnt/store && cp -r /nix/store/* /mnt/store/)"
|
|
||||||
- "[ -d /mnt/var/ ] || cp -r /nix/var /mnt/"
|
|
||||||
- cp nix/nix.conf /etc/nix/nix.conf
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-build --no-build-output --attr pkgs.arm64.release --argstr git_version $DRONE_COMMIT
|
- nix-build --no-build-output --attr pkgs.arm64.release --argstr git_version $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/garage"
|
||||||
|
|
||||||
- name: push static binary
|
- name: push static binary
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: garagehq_aws_access_key_id
|
from_secret: garagehq_aws_access_key_id
|
||||||
|
@ -311,11 +171,6 @@ steps:
|
||||||
|
|
||||||
- name: docker build and publish
|
- name: docker build and publish
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
environment:
|
environment:
|
||||||
DOCKER_AUTH:
|
DOCKER_AUTH:
|
||||||
from_secret: docker_auth
|
from_secret: docker_auth
|
||||||
|
@ -338,44 +193,18 @@ kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: release-linux-arm
|
name: release-linux-arm
|
||||||
|
|
||||||
volumes:
|
node:
|
||||||
- name: nix_store
|
nix-daemon: 1
|
||||||
host:
|
|
||||||
path: /var/lib/drone/nix
|
|
||||||
- name: nix_config
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: nix maintenance
|
|
||||||
image: nixpkgs/nix:nixos-22.05
|
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /mnt
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
|
||||||
- "[ -d /mnt/store/3vpyn2qz5ay057nq9x68sh0r328d77ng-nix-2.8.1/ ] || (mkdir -p /mnt/store && cp -r /nix/store/* /mnt/store/)"
|
|
||||||
- "[ -d /mnt/var/ ] || cp -r /nix/var /mnt/"
|
|
||||||
- cp nix/nix.conf /etc/nix/nix.conf
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
commands:
|
commands:
|
||||||
- nix-build --no-build-output --attr pkgs.arm.release --argstr git_version $DRONE_COMMIT
|
- nix-build --no-build-output --attr pkgs.arm.release --argstr git_version $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/garage"
|
||||||
|
|
||||||
- name: push static binary
|
- name: push static binary
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: garagehq_aws_access_key_id
|
from_secret: garagehq_aws_access_key_id
|
||||||
|
@ -386,11 +215,6 @@ steps:
|
||||||
|
|
||||||
- name: docker build and publish
|
- name: docker build and publish
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
- name: nix_config
|
|
||||||
path: /etc/nix
|
|
||||||
environment:
|
environment:
|
||||||
DOCKER_AUTH:
|
DOCKER_AUTH:
|
||||||
from_secret: docker_auth
|
from_secret: docker_auth
|
||||||
|
@ -413,17 +237,12 @@ kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: refresh-release-page
|
name: refresh-release-page
|
||||||
|
|
||||||
volumes:
|
node:
|
||||||
- name: nix_store
|
nix-daemon: 1
|
||||||
host:
|
|
||||||
path: /var/lib/drone/nix
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: refresh-index
|
- name: refresh-index
|
||||||
image: nixpkgs/nix:nixos-22.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
volumes:
|
|
||||||
- name: nix_store
|
|
||||||
path: /nix
|
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: garagehq_aws_access_key_id
|
from_secret: garagehq_aws_access_key_id
|
||||||
|
@ -446,6 +265,6 @@ trigger:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 0a72ff9a422018b7b06754bd5b9561d3f4bb0d5af28a20ec365c719ee263378a
|
hmac: 8495114848396ebb492831fc9bd37b353e1a4add9d72c0a123d109490a5b0db0
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue