diff options
author | Alex <alex@adnab.me> | 2024-02-09 12:11:23 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2024-02-09 12:11:23 +0000 |
commit | 0c7ce001c907791518f93fd9d2db01eebc517c51 (patch) | |
tree | 08336bb7610c35b7707d3c87fd3f4eac7e2b21f7 /.woodpecker | |
parent | e4a43bfd592c149af8e3eac58ab317a518f0968a (diff) | |
parent | f7ae966ed34d3ca8fb20afd2f20874dd42df7f7e (diff) | |
download | garage-0c7ce001c907791518f93fd9d2db01eebc517c51.tar.gz garage-0c7ce001c907791518f93fd9d2db01eebc517c51.zip |
Merge pull request 'Fix & simplify CI using Woodpecker' (#706) from nix-improvements into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/706
Diffstat (limited to '.woodpecker')
-rw-r--r-- | .woodpecker/debug.yaml | 4 | ||||
-rw-r--r-- | .woodpecker/publish.yaml | 23 | ||||
-rw-r--r-- | .woodpecker/release.yaml | 39 |
3 files changed, 33 insertions, 33 deletions
diff --git a/.woodpecker/debug.yaml b/.woodpecker/debug.yaml index 9486f672..59ae8c06 100644 --- a/.woodpecker/debug.yaml +++ b/.woodpecker/debug.yaml @@ -10,7 +10,7 @@ steps: - name: check formatting image: nixpkgs/nix:nixos-22.05 commands: - - nix-shell --attr rust --run "cargo fmt -- --check" + - nix-shell --attr devShell --run "cargo fmt -- --check" - name: build image: nixpkgs/nix:nixos-22.05 @@ -41,4 +41,4 @@ steps: image: nixpkgs/nix:nixos-22.05 commands: - nix-build --no-build-output --attr clippy.amd64 --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} - - nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false) + - nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false) diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml index b45d379c..739af2c4 100644 --- a/.woodpecker/publish.yaml +++ b/.woodpecker/publish.yaml @@ -16,17 +16,14 @@ steps: target: AWS_SECRET_ACCESS_KEY commands: - mkdir -p /etc/nix && cp nix/nix.conf /etc/nix/nix.conf - - nix-shell --attr release --run "refresh_index" + - nix-shell --attr ci --run "refresh_index" -# - name: multiarch-docker -# image: nixpkgs/nix:nixos-22.05 -# environment: -# HOME: "/root" -# secrets: -# - docker_auth -# commands: -# - mkdir -p /root/.docker -# - echo $DOCKER_AUTH > /root/.docker/config.json -# - sha512sum /root/.docker/config.json -# - export CONTAINER_TAG=${CI_COMMIT_TAG:-$CI_COMMIT_SHA} -# - nix-shell --attr release --run "multiarch_docker" + - name: multiarch-docker + image: nixpkgs/nix:nixos-22.05 + secrets: + - docker_auth + commands: + - mkdir -p /root/.docker + - echo $DOCKER_AUTH > /root/.docker/config.json + - export CONTAINER_TAG=${CI_COMMIT_TAG:-$CI_COMMIT_SHA} + - nix-shell --attr ci --run "multiarch_docker" diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 8580441c..c57d7272 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -19,12 +19,17 @@ steps: image: nixpkgs/nix:nixos-22.05 commands: - nix-build --no-build-output --attr pkgs.${ARCH}.release --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} - - nix-shell --attr rust --run "./script/not-dynamic.sh result-bin/bin/garage" + + - name: check is static binary + image: nixpkgs/nix:nixos-22.05 + commands: + - nix-build --no-build-output --attr pkgs.${ARCH}.release --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} + - nix-shell --attr ci --run "./script/not-dynamic.sh result-bin/bin/garage" - name: integration tests image: nixpkgs/nix:nixos-22.05 commands: - - nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false) + - nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false) when: - matrix: ARCH: amd64 @@ -34,7 +39,7 @@ steps: - name: upgrade tests image: nixpkgs/nix:nixos-22.05 commands: - - nix-shell --attr integration --run "./script/test-upgrade.sh v0.8.4 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false) + - nix-shell --attr ci --run "./script/test-upgrade.sh v0.8.4 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false) when: - matrix: ARCH: amd64 @@ -49,19 +54,17 @@ steps: - source: garagehq_aws_secret_access_key target: AWS_SECRET_ACCESS_KEY commands: - - nix-shell --attr release --run "to_s3_woodpecker" + - nix-shell --attr ci --run "to_s3" -# - name: docker build and publish -# image: nixpkgs/nix:nixos-22.05 -# environment: -# DOCKER_PLATFORM: "linux/${ARCH}" -# CONTAINER_NAME: "dxflrs/${ARCH}_garage" -# HOME: "/kaniko" -# secrets: -# - docker_auth -# commands: -# - mkdir -p /kaniko/.docker -# - echo $DOCKER_AUTH > /kaniko/.docker/config.json -# - sha512sum /kaniko/.docker/config.json -# - export CONTAINER_TAG=${CI_COMMIT_TAG:-$CI_COMMIT_SHA} -# - nix-shell --attr release --run "to_docker" + - name: docker build and publish + image: nixpkgs/nix:nixos-22.05 + environment: + DOCKER_PLATFORM: "linux/${ARCH}" + CONTAINER_NAME: "dxflrs/${ARCH}_garage" + secrets: + - docker_auth + commands: + - mkdir -p /root/.docker + - echo $DOCKER_AUTH > /root/.docker/config.json + - export CONTAINER_TAG=${CI_COMMIT_TAG:-$CI_COMMIT_SHA} + - nix-shell --attr ci --run "to_docker" |