From 54815c2f5f69a1ad878f486de40435e54a264d77 Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Wed, 26 Oct 2022 07:13:06 +0000 Subject: [PATCH 1/3] Add .drone.yml --- .drone.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6736ac7 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,56 @@ +kind: pipeline +type: kubernetes +name: cicd-pipeline + +steps: + - name: Build docs + image: ubuntu + commands: + - apt-get update + - >- + apt-get + install + make + doxygen + graphviz + -y + - cd "BmpPP/BmpPP/doxygen" + - make + + - name: Deploy docs to production + image: ubuntu + environment: + SSH_PRIV: + from_secret: ssh-priv + SSH_PUB: + from_secret: ssh-pub + KNOWN_HOSTS: + from_secret: known-hosts # this is just $(ssh-keyscan -p 2222 leonetienne.de) + commands: + - apt-get update + - >- + apt-get + install + openssh-client + rsync + -y + - eval "$(ssh-agent -s)" + - mkdir -p ~/.ssh + - echo "$SSH_PRIV" > ~/.ssh/id_ed25519 + - echo "$SSH_PUB" > ~/.ssh/id_ed25519.pub + - echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts + - chmod 600 ~/.ssh/id_ed25519 + - chmod 644 ~/.ssh/id_ed25519.pub + - chmod 644 ~/.ssh/known_hosts + - ssh-add + - cd "BmpPP/BmpPP/doxygen" + - >- + rsync + -avz + --recursive + --delete + --delete-excluded + -e + "ssh -o IdentitiesOnly=yes -p 2222" + ./build/ + doxygen-bmppp@leonetienne.de:app \ No newline at end of file From 47ba2ef748c199e48de36ed2f00e6ec3704c2c65 Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Wed, 26 Oct 2022 07:14:38 +0000 Subject: [PATCH 2/3] Fix path in cicd pipeline --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 6736ac7..1e3dfcc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,7 @@ steps: doxygen graphviz -y - - cd "BmpPP/BmpPP/doxygen" + - cd "BmpPP/doxygen" - make - name: Deploy docs to production From 75b550649ca0d2370e9c5ff5c00fe7019048baa3 Mon Sep 17 00:00:00 2001 From: Leon Etienne Date: Wed, 26 Oct 2022 07:16:01 +0000 Subject: [PATCH 3/3] Fix path in cicd pipeline --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1e3dfcc..50c92a6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -43,7 +43,7 @@ steps: - chmod 644 ~/.ssh/id_ed25519.pub - chmod 644 ~/.ssh/known_hosts - ssh-add - - cd "BmpPP/BmpPP/doxygen" + - cd "BmpPP/doxygen" - >- rsync -avz