From 7036a24c729ea39ccba3b283d40f68b875d41723 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 23 Jun 2022 09:22:04 +0200 Subject: [PATCH 1/3] ci: woodpecker: add exec pipeline --- .woodpecker/exec.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .woodpecker/exec.yml diff --git a/.woodpecker/exec.yml b/.woodpecker/exec.yml new file mode 100644 index 0000000..1a22717 --- /dev/null +++ b/.woodpecker/exec.yml @@ -0,0 +1,26 @@ +labels: + type: exec + +pipeline: + test: + image: bash + commands: + - "nix run 'nixpkgs#hello'" + + notify: + image: bash + secrets: + - source: matrix_homeserver + target: address + - source: matrix_roomid + target: room + - source: matrix_username + target: user + - source: matrix_password + target: pass + commands: + - nix run 'github:ambroisie/matrix-notifier' + when: + status: + - failure + - success From 6fe5dec87ce91955e35e3be990e03f011b032f30 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 30 Mar 2023 22:14:33 +0100 Subject: [PATCH 2/3] ci: woodpecker: debug exec pipeline --- .woodpecker/exec.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.woodpecker/exec.yml b/.woodpecker/exec.yml index 1a22717..b78925a 100644 --- a/.woodpecker/exec.yml +++ b/.woodpecker/exec.yml @@ -7,6 +7,30 @@ pipeline: commands: - "nix run 'nixpkgs#hello'" + manual_plugin: + image: bash + secrets: + commands: + - CI_WORKSPACE=$PWD plugin-git + when: + status: + - failure + + manual_clone: + image: bash + secrets: + commands: + - git init -b main + - git remote add origin https://git.belanyi.fr/ambroisie/test-drone.git + - "git fetch --no-tags --depth=1 --filter=tree:0 origin +refs/heads/main:" + - git reset --hard -q 3330a384f641d5e12c0ff8b225037fbcf2e3bd7b + - git submodule update --init --recursive + - git lfs fetch + - git lfs checkout + when: + status: + - failure + notify: image: bash secrets: From 17858719868ba7999fad0f1b72a6f3149e4d08a6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 30 Mar 2023 22:29:22 +0100 Subject: [PATCH 3/3] ci: woodpecker: debug exec runner nix --- .woodpecker/exec.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.woodpecker/exec.yml b/.woodpecker/exec.yml index b78925a..44229a1 100644 --- a/.woodpecker/exec.yml +++ b/.woodpecker/exec.yml @@ -5,7 +5,13 @@ pipeline: test: image: bash commands: + - echo $HOME - "nix run 'nixpkgs#hello'" + - HOME=$(mktemp -d) nix run 'nixpkgs#hello' + when: + status: + - failure + - success manual_plugin: image: bash