From 2f45834c75afa7f8e306b947ccf1dae033b7b461 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sun, 3 Mar 2024 19:46:57 +0100 Subject: [PATCH] add mage:test image --- .woodpecker/mage.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .woodpecker/mage.yml diff --git a/.woodpecker/mage.yml b/.woodpecker/mage.yml new file mode 100644 index 0000000..037575c --- /dev/null +++ b/.woodpecker/mage.yml @@ -0,0 +1,36 @@ +variables: + volumes: &volumes + - /data/${CI_REPO}:/builds + +steps: + "Deploy": + image: deblan/mage:test + secrets: [ssh_priv_key, ssh_user, ssh_host, app_directory] + volumes: *volumes + pull: true + settings: + directory: "/builds/$CI_COMMIT_SHA" + ssh_key: + content: + from_secret: ssh_priv_key + file: "$HOME/.ssh/id_ed25519" + template: .mage.yml.dist + substitutions: + - from: ssh_user + to: + from_secret: ssh_user + - from: ssh_host + to: + from_secret: ssh_host + targets: "$CI_PIPELINE_DEPLOY_TARGET" + # commands: + # - cd "/builds/$CI_COMMIT_SHA" + # - mkdir "$HOME/.ssh" + # - echo "$SSH_PRIV_KEY" > "$HOME/.ssh/id_ed25519" + # - chmod 700 "$HOME/.ssh" + # - chmod 600 "$HOME/.ssh/id_ed25519" + # - cp .mage.yml.dist .mage.yml + # - sed -i "s/ssh_user/$SSH_USER/g" .mage.yml + # - sed -i "s/ssh_host/$SSH_HOST/g" .mage.yml + # - sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml + # - mage deploy "$CI_PIPELINE_DEPLOY_TARGET"