From 8b6a44a53d0b5b5f61dd597ae8d698a873868305 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 8 Feb 2024 15:41:52 +0100 Subject: [woodpecker] convert drone pipelines to woodpecker --- .woodpecker/release.yaml | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .woodpecker/release.yaml (limited to '.woodpecker/release.yaml') diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml new file mode 100644 index 00000000..1fe48529 --- /dev/null +++ b/.woodpecker/release.yaml @@ -0,0 +1,69 @@ +when: + event: + - deployment + - cron + +matrix: + include: + - ARCH: amd64 + TARGET: x86_64-unknown-linux-musl + - ARCH: i386 + TARGET: i686-unknown-linux-musl + - ARCH: arm64 + TARGET: aarch64-unknown-linux-musl + - ARCH: arm + TARGET: armv6l-unknown-linux-musleabihf + +steps: + - name: build + 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: integration tests + image: nixpkgs/nix:nixos-22.05 + commands: + - nix-shell --attr integration --run ./script/test-smoke.sh || (cat /tmp/garage.log; false) + when: + - matrix: + ARCH: amd64 + - matrix: + ARCH: i386 + + - 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) + when: + - matrix: + ARCH: amd64 + - matrix: + ARCH: i386 + + - name: push static binary + image: nixpkgs/nix:nixos-22.05 + environment: + TARGET: "${TARGET}" + secrets: + - source: garagehq_aws_access_key_id + target: AWS_ACCESS_KEY_ID + - source: garagehq_aws_secret_access_key + target: AWS_SECRET_ACCESS_KEY + commands: + - nix-shell --attr release --run "to_s3_woodpecker" + + - 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" -- cgit v1.2.3 From 4e62e86644ddfd28e01951f8d2f09fc421b0f716 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 8 Feb 2024 18:27:33 +0100 Subject: [woodpecker] disable docker image generation as auth is broken for now --- .woodpecker/release.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to '.woodpecker/release.yaml') diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 1fe48529..4f4771b6 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -53,17 +53,17 @@ steps: commands: - nix-shell --attr release --run "to_s3_woodpecker" - - 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" +# 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" -- cgit v1.2.3 From 25c2f37667eb3b06bb14869129e33f78a9705b1b Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 8 Feb 2024 18:42:26 +0100 Subject: [woodpecker] remove upgrade test on i386 --- .woodpecker/release.yaml | 2 -- 1 file changed, 2 deletions(-) (limited to '.woodpecker/release.yaml') diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 4f4771b6..8580441c 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -38,8 +38,6 @@ steps: when: - matrix: ARCH: amd64 - - matrix: - ARCH: i386 - name: push static binary image: nixpkgs/nix:nixos-22.05 -- cgit v1.2.3 From 1c85e5e428d8b449bb0e0933f329bcba3b583697 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 9 Feb 2024 11:19:32 +0100 Subject: [nix-improvements] adapt woodpecker pipelines --- .woodpecker/release.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.woodpecker/release.yaml') diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 8580441c..1d54e3cf 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -19,12 +19,12 @@ 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" + - 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 +34,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,7 +49,7 @@ 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_woodpecker" # - name: docker build and publish # image: nixpkgs/nix:nixos-22.05 @@ -64,4 +64,4 @@ steps: # - 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" +# - nix-shell --attr ci --run "to_docker" -- cgit v1.2.3 From 555ed75548d2f42f9d86cc2b8d6844e6b7d35740 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 9 Feb 2024 11:36:51 +0100 Subject: [nix-improvements] ci: check static as separate step --- .woodpecker/release.yaml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.woodpecker/release.yaml') diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 1d54e3cf..e5db48b8 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -16,6 +16,11 @@ matrix: steps: - name: build + 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} + + - 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} -- cgit v1.2.3 From 1be75fbf4e750d03e1f091016ef44814da674126 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 9 Feb 2024 11:40:35 +0100 Subject: [nix-improvements] fix kaniko and manifest-tool --- .woodpecker/release.yaml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to '.woodpecker/release.yaml') diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index e5db48b8..8f19be82 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -56,17 +56,15 @@ steps: commands: - nix-shell --attr ci --run "to_s3_woodpecker" -# - 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 ci --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" -- cgit v1.2.3 From 561fad0b44f78372357c1c76e3708a062d703b33 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 9 Feb 2024 12:19:16 +0100 Subject: [nix-improvements] get rid of Drone --- .woodpecker/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.woodpecker/release.yaml') diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index 8f19be82..c57d7272 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -54,7 +54,7 @@ steps: - source: garagehq_aws_secret_access_key target: AWS_SECRET_ACCESS_KEY commands: - - nix-shell --attr ci --run "to_s3_woodpecker" + - nix-shell --attr ci --run "to_s3" - name: docker build and publish image: nixpkgs/nix:nixos-22.05 -- cgit v1.2.3