From a90a5c221e138e57b069618edfc8939b3a82ceea Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 10:17:00 +0100 Subject: [PATCH 01/20] adjust gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 33e236f..e2d2d40 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Project specific ignores -/test.env +/local.env /prod.env /log/* From 8dd2faacfea6934202d9b36f88b84bfb528bcdc8 Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 10:34:45 +0100 Subject: [PATCH 02/20] adjustments and first steps --- .github/workflows/pipeline.yml | 45 ++++++++++++++++++++ {testing => test/postgres}/preset_data.sql | 0 {testing => test/postgres}/test.compose.yaml | 0 3 files changed, 45 insertions(+) rename {testing => test/postgres}/preset_data.sql (100%) rename {testing => test/postgres}/test.compose.yaml (100%) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 3cda35b..ef28221 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -64,3 +64,48 @@ jobs: password: ${{ secrets.DOCKER_HUB_PASSWORD }} repository: ${{ vars.DOCKER_HUB_USERNAME }}/backup readme-filepath: ./README.md + + +test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Generate SSH Key Pair + run: | + mkdir -p sftp-keys + ssh-keygen -t rsa -b 2048 -f sftp-keys/id_rsa -q -N "" + chmod 600 sftp-keys/id_rsa + + - name: Start SFTP Server with Mounts + run: | + docker run -d --name fake-sftp \ + -p 22:22 \ + -v $(pwd)/sftp-keys/id_rsa.pub:/home/test/.ssh/keys/id_rsa.pub:ro \ + -v $(pwd)/sftp-data:/home/test/uploads \ + atmoz/sftp test::1001 + + - name: Wait for SFTP server to be ready + run: | + for i in {1..10}; do + if nc -z localhost 2222; then + echo "SFTP server is up!" + exit 0 + fi + echo "Waiting for SFTP server..." + sleep 2 + done + echo "SFTP server did not start in time" && exit 1 + + - name: Create test files + run: | + mkdir -p test-data + echo "File 1 content" > test-data/file1.txt + echo "File 2 content" > test-data/file2.txt + echo "File 3 content" > test-data/file3.txt + + - name: Run Backup Container + run: | + echo "not implemented" diff --git a/testing/preset_data.sql b/test/postgres/preset_data.sql similarity index 100% rename from testing/preset_data.sql rename to test/postgres/preset_data.sql diff --git a/testing/test.compose.yaml b/test/postgres/test.compose.yaml similarity index 100% rename from testing/test.compose.yaml rename to test/postgres/test.compose.yaml From 8e9342d506f5753b3bb10583519377431b5670f3 Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 10:38:47 +0100 Subject: [PATCH 03/20] fix indent --- .github/workflows/pipeline.yml | 74 +++++++++++++++++----------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ef28221..e164c29 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -66,46 +66,46 @@ jobs: readme-filepath: ./README.md -test: - runs-on: ubuntu-latest + test: + runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 + steps: + - name: Checkout repository + uses: actions/checkout@v3 - - name: Generate SSH Key Pair - run: | - mkdir -p sftp-keys - ssh-keygen -t rsa -b 2048 -f sftp-keys/id_rsa -q -N "" - chmod 600 sftp-keys/id_rsa + - name: Generate SSH Key Pair + run: | + mkdir -p sftp-keys + ssh-keygen -t rsa -b 2048 -f sftp-keys/id_rsa -q -N "" + chmod 600 sftp-keys/id_rsa - - name: Start SFTP Server with Mounts - run: | - docker run -d --name fake-sftp \ - -p 22:22 \ - -v $(pwd)/sftp-keys/id_rsa.pub:/home/test/.ssh/keys/id_rsa.pub:ro \ - -v $(pwd)/sftp-data:/home/test/uploads \ - atmoz/sftp test::1001 + - name: Start SFTP Server with Mounts + run: | + docker run -d --name fake-sftp \ + -p 22:22 \ + -v $(pwd)/sftp-keys/id_rsa.pub:/home/test/.ssh/keys/id_rsa.pub:ro \ + -v $(pwd)/sftp-data:/home/test/uploads \ + atmoz/sftp test::1001 - - name: Wait for SFTP server to be ready - run: | - for i in {1..10}; do - if nc -z localhost 2222; then - echo "SFTP server is up!" - exit 0 - fi - echo "Waiting for SFTP server..." - sleep 2 - done - echo "SFTP server did not start in time" && exit 1 + - name: Wait for SFTP server to be ready + run: | + for i in {1..10}; do + if nc -z localhost 2222; then + echo "SFTP server is up!" + exit 0 + fi + echo "Waiting for SFTP server..." + sleep 2 + done + echo "SFTP server did not start in time" && exit 1 - - name: Create test files - run: | - mkdir -p test-data - echo "File 1 content" > test-data/file1.txt - echo "File 2 content" > test-data/file2.txt - echo "File 3 content" > test-data/file3.txt + - name: Create test files + run: | + mkdir -p test-data + echo "File 1 content" > test-data/file1.txt + echo "File 2 content" > test-data/file2.txt + echo "File 3 content" > test-data/file3.txt - - name: Run Backup Container - run: | - echo "not implemented" + - name: Run Backup Container + run: | + echo "not implemented" From 8c00ec1aeb11788f3293e235b273e60f0399605b Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 10:49:38 +0100 Subject: [PATCH 04/20] use port 2222 --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index e164c29..0698054 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -82,7 +82,7 @@ jobs: - name: Start SFTP Server with Mounts run: | docker run -d --name fake-sftp \ - -p 22:22 \ + -p 2222:22 \ -v $(pwd)/sftp-keys/id_rsa.pub:/home/test/.ssh/keys/id_rsa.pub:ro \ -v $(pwd)/sftp-data:/home/test/uploads \ atmoz/sftp test::1001 From a4c05b875b7df6ea2206cda6f030159df4aa994f Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 11:21:09 +0100 Subject: [PATCH 05/20] adding for tests --- .env | 4 ++++ .github/workflows/pipeline.yml | 10 +++++++++- docker/manager.sh | 4 ++++ docker/prepare_ssh.sh | 1 + run_backup.sh | 1 + test.env | 23 +++++++++++++++++++++++ 6 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 test.env diff --git a/.env b/.env index e2e9725..72c8f6d 100644 --- a/.env +++ b/.env @@ -38,6 +38,10 @@ ENV_CRON='0 1 * * *' ### possible values: "postgres", "nextcloud", "none" ENV_PROVISION_MODE="nextcloud" +## storagebox settings +### storagebox settings (optional) +# when not set, defaults to 22 +ENV_TARGET_DOMAIN_PORT="22" ### storagebox settings (needed) ENV_TARGET_DOMAIN=name_of_your_storagebox_domain ENV_TARGET_DOMAIN_USER=login_name_of_your_storagebox diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 0698054..c05074f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -106,6 +106,14 @@ jobs: echo "File 2 content" > test-data/file2.txt echo "File 3 content" > test-data/file3.txt + - name: build docker image + run: | + docker build -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest + + - name: prepare test.env + run: | + echo "ENV_SSH_PRIVATE_KEY_BASE64=$(cat $(pwd)/sftp-keys/id_rsa | base64 -w 0)" >> test.env + - name: Run Backup Container run: | - echo "not implemented" + ./run_backup.sh && sleep 25 && exit 0 \ No newline at end of file diff --git a/docker/manager.sh b/docker/manager.sh index 4a71bda..2b76247 100644 --- a/docker/manager.sh +++ b/docker/manager.sh @@ -33,6 +33,10 @@ fi if [[ $status_backup == 0 ]]; then telegram.sh "Backup: Successful" + # todo: find a better way for assert the backup status in tests + echo "Backup: Successful" 2>&1 | tee ${backupLastLogfile} else telegram.sh "Backup: Failure" + # todo: find a better way for assert the backup status in tests + echo "Backup: Failure" 2>&1 | tee ${backupLastLogfile} fi diff --git a/docker/prepare_ssh.sh b/docker/prepare_ssh.sh index 4b3f97c..807ef67 100644 --- a/docker/prepare_ssh.sh +++ b/docker/prepare_ssh.sh @@ -13,5 +13,6 @@ cat < /etc/ssh/ssh_config Host storagebox Hostname $TARGET_DOMAIN User $TARGET_DOMAIN_USER + Port ${TARGET_DOMAIN_PORT:-22} IdentityFile /private_key EOL diff --git a/run_backup.sh b/run_backup.sh index 8b9fa9e..6b0d84d 100755 --- a/run_backup.sh +++ b/run_backup.sh @@ -65,6 +65,7 @@ docker run ${RESTART_OPTION} --hostname backup \ $SOURCE_MOUNT \ -e "DEBUG"="${_DEBUG}" \ -e "TARGET_DOMAIN"="${ENV_TARGET_DOMAIN}" \ + -e "TARGET_DOMAIN_PORT"="${ENV_TARGET_DOMAIN_PORT}" \ -e "TARGET_DOMAIN_USER"="${ENV_TARGET_DOMAIN_USER}" \ -e "SSH_PRIVATE_KEY_BASE64"="${ENV_SSH_PRIVATE_KEY_BASE64}" \ -e "NC_URL"="${ENV_NC_URL}" \ diff --git a/test.env b/test.env new file mode 100644 index 0000000..df50c14 --- /dev/null +++ b/test.env @@ -0,0 +1,23 @@ +SCRIPT_DATA_TO_BACKUP='none' +#SCRIPT_RESTORE_DATA_TO=/path/to/restore/data +#SCRIPT_LOG_PATH=/path/to/logfiles + +### restic (needed) +ENV_RESTIC_REPOSITORY_NAME=test +ENV_RESTIC_PASSWORD='test123' + +### telegram (needed) +ENV_TELEGRAM_TOKEN=123 +ENV_TELEGRAM_CHAT_ID=123 + +### CRON, defaults to 1am (needed) +ENV_CRON='0 1 * * *' + +### provision mode (needed) +### possible values: "postgres", "nextcloud", "none" +ENV_PROVISION_MODE="none" + +ENV_TARGET_DOMAIN_PORT="2222" +### storagebox settings (needed) +ENV_TARGET_DOMAIN=localhost +ENV_TARGET_DOMAIN_USER=test From 8a8bfa0ec52dd08bcb7925aee98a5823172d910d Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 11:21:53 +0100 Subject: [PATCH 06/20] fix lint error --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index c05074f..0f2205f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -111,7 +111,7 @@ jobs: docker build -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest - name: prepare test.env - run: | + run: | echo "ENV_SSH_PRIVATE_KEY_BASE64=$(cat $(pwd)/sftp-keys/id_rsa | base64 -w 0)" >> test.env - name: Run Backup Container From a5df79f83df33e5f71ab9ec65073661577169bbb Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 11:23:05 +0100 Subject: [PATCH 07/20] adjust correct docker build folder --- .github/workflows/pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 0f2205f..9ea935b 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -108,7 +108,9 @@ jobs: - name: build docker image run: | + cd docker docker build -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest + cd .. - name: prepare test.env run: | From 27dac3ba721e15a5610d9b8fb34e98f04a1054a7 Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 11:24:20 +0100 Subject: [PATCH 08/20] adjust correct docker build folder --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 9ea935b..9c4098a 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -109,7 +109,7 @@ jobs: - name: build docker image run: | cd docker - docker build -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest + docker build -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest . cd .. - name: prepare test.env From ada07523e8f2bf69c4f410835255875f870c4c61 Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 11:26:26 +0100 Subject: [PATCH 09/20] add caches for buildings --- .github/workflows/pipeline.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 9c4098a..bb55100 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -106,11 +106,15 @@ jobs: echo "File 2 content" > test-data/file2.txt echo "File 3 content" > test-data/file3.txt - - name: build docker image - run: | - cd docker - docker build -t ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest . - cd .. + - name: Build for testing + uses: docker/build-push-action@v6 + with: + context: ./docker + push: false + tags: ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest + platforms: linux/amd64 + cache-from: type=gha + cache-to: type=gha,mode=max - name: prepare test.env run: | From a711d0b3efaab9f1d8403c8a77c792dca1a198ff Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 11:29:54 +0100 Subject: [PATCH 10/20] fast hack --- run_backup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run_backup.sh b/run_backup.sh index 6b0d84d..315b63e 100755 --- a/run_backup.sh +++ b/run_backup.sh @@ -18,7 +18,8 @@ if [[ "$#" -gt 0 ]]; then esac fi ### -source .env +### TODO: find a way to change env file for testing and prod usage +source test.env ### ### create restore folder at the same level as the script From 2443f2a357131930c3857f982a8bdc2d36142e35 Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 11:31:58 +0100 Subject: [PATCH 11/20] add prep step for cache builds --- .github/workflows/pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index bb55100..9809ef1 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -106,6 +106,7 @@ jobs: echo "File 2 content" > test-data/file2.txt echo "File 3 content" > test-data/file3.txt + - uses: docker/setup-buildx-action@v3 - name: Build for testing uses: docker/build-push-action@v6 with: From f0c68820464d9425a3c41a6af14fc59d44d9c90c Mon Sep 17 00:00:00 2001 From: realAP Date: Tue, 4 Feb 2025 11:40:01 +0100 Subject: [PATCH 12/20] cat test.env --- .github/workflows/pipeline.yml | 1 + test.env | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 9809ef1..8914f3b 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -120,6 +120,7 @@ jobs: - name: prepare test.env run: | echo "ENV_SSH_PRIVATE_KEY_BASE64=$(cat $(pwd)/sftp-keys/id_rsa | base64 -w 0)" >> test.env + cat test.env - name: Run Backup Container run: | diff --git a/test.env b/test.env index df50c14..95e0a4e 100644 --- a/test.env +++ b/test.env @@ -17,7 +17,7 @@ ENV_CRON='0 1 * * *' ### possible values: "postgres", "nextcloud", "none" ENV_PROVISION_MODE="none" -ENV_TARGET_DOMAIN_PORT="2222" +ENV_TARGET_DOMAIN_PORT=2222 ### storagebox settings (needed) ENV_TARGET_DOMAIN=localhost ENV_TARGET_DOMAIN_USER=test From 7d5fc1c39382e4df129f1f69f0a4c94483781189 Mon Sep 17 00:00:00 2001 From: realAP Date: Wed, 5 Feb 2025 14:50:46 +0100 Subject: [PATCH 13/20] make it simple backup and then terminate --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 8914f3b..e785ff7 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -124,4 +124,4 @@ jobs: - name: Run Backup Container run: | - ./run_backup.sh && sleep 25 && exit 0 \ No newline at end of file + ./run_backup.sh backup /source \ No newline at end of file From 9637affe210cc98e7047acf7cefa9c5a34a20e12 Mon Sep 17 00:00:00 2001 From: realAP Date: Wed, 5 Feb 2025 14:54:31 +0100 Subject: [PATCH 14/20] for testing --- .github/workflows/pipeline.yml | 2 +- run_backup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index e785ff7..6d4c98b 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -112,7 +112,7 @@ jobs: with: context: ./docker push: false - tags: ${{ vars.DOCKER_HUB_USERNAME }}/backup:latest + tags: ${{ vars.DOCKER_HUB_USERNAME }}/backup:test platforms: linux/amd64 cache-from: type=gha cache-to: type=gha,mode=max diff --git a/run_backup.sh b/run_backup.sh index 315b63e..0f21d5e 100755 --- a/run_backup.sh +++ b/run_backup.sh @@ -82,4 +82,4 @@ docker run ${RESTART_OPTION} --hostname backup \ -e POSTGRES_HOST="${ENV_POSTGRES_HOST}" \ -e PROVISION_MODE="${ENV_PROVISION_MODE}" \ -e "CRON"="${ENV_CRON}" \ - devp1337/backup:latest "${@}" + devp1337/backup:test "${@}" From a8a853835247bbac24f091eff73823b88633f1be Mon Sep 17 00:00:00 2001 From: realAP Date: Wed, 5 Feb 2025 14:58:14 +0100 Subject: [PATCH 15/20] try something --- .github/workflows/pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 6d4c98b..93c4b64 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -112,6 +112,7 @@ jobs: with: context: ./docker push: false + load: true tags: ${{ vars.DOCKER_HUB_USERNAME }}/backup:test platforms: linux/amd64 cache-from: type=gha From b9fc90b0b016416c51e628912115c83a657f27e1 Mon Sep 17 00:00:00 2001 From: realAP Date: Wed, 5 Feb 2025 14:59:53 +0100 Subject: [PATCH 16/20] add echo for testing --- docker/entry.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/entry.sh b/docker/entry.sh index 006883f..7a53199 100644 --- a/docker/entry.sh +++ b/docker/entry.sh @@ -21,6 +21,8 @@ if [[ "$DEBUG" == "1" ]];then exec bin/bash fi +echo "TODO: REMOVE ME: CI/CD TESTING" + # argument mode if [[ $# -gt 0 ]]; then restic "${@}" From e2e2549901434a691ce8f6e5ec1092797aef86ba Mon Sep 17 00:00:00 2001 From: realAP Date: Wed, 5 Feb 2025 15:09:28 +0100 Subject: [PATCH 17/20] add debugging --- docker/prepare_ssh.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/prepare_ssh.sh b/docker/prepare_ssh.sh index 807ef67..0703a58 100644 --- a/docker/prepare_ssh.sh +++ b/docker/prepare_ssh.sh @@ -16,3 +16,11 @@ Host storagebox Port ${TARGET_DOMAIN_PORT:-22} IdentityFile /private_key EOL + + +echo "DEBUG: prepare_ssh.sh" +echo "cat known hosts" +cat /etc/ssh/ssh_known_hosts + +echo "cat ssh_config" +cat /etc/ssh/ssh_config \ No newline at end of file From 667975cfa2fcf155bbdaa449a7f46a2402a3da9f Mon Sep 17 00:00:00 2001 From: realAP Date: Wed, 5 Feb 2025 15:13:17 +0100 Subject: [PATCH 18/20] add debugging II --- docker/prepare.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/prepare.sh b/docker/prepare.sh index 2bd9bb6..4716ee6 100644 --- a/docker/prepare.sh +++ b/docker/prepare.sh @@ -56,5 +56,12 @@ mkdir -p /restore ## Backup specific parts not plugins prepare_ssh.sh +echo "DEBUG: prepare_ssh.sh" +echo "cat known hosts" +cat /etc/ssh/ssh_known_hosts + +echo "cat ssh_config" +cat /etc/ssh/ssh_config + ## Feature specific parts # currently nothing here From 6d84b239f2a230dccd009c8c23dd00a9de20c275 Mon Sep 17 00:00:00 2001 From: realAP Date: Wed, 5 Feb 2025 15:18:28 +0100 Subject: [PATCH 19/20] add debugging III --- .github/workflows/pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 93c4b64..6cf2a93 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -106,6 +106,10 @@ jobs: echo "File 2 content" > test-data/file2.txt echo "File 3 content" > test-data/file3.txt + - name: delete before + run: | + docker rmi ${{ vars.DOCKER_HUB_USERNAME }}/backup:test || true + - uses: docker/setup-buildx-action@v3 - name: Build for testing uses: docker/build-push-action@v6 From 3d8736777148150467103aee50ea10f02c83623f Mon Sep 17 00:00:00 2001 From: realAP Date: Wed, 5 Feb 2025 15:21:08 +0100 Subject: [PATCH 20/20] add debugging IV --- docker/entry.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/entry.sh b/docker/entry.sh index 7a53199..e3e4e80 100644 --- a/docker/entry.sh +++ b/docker/entry.sh @@ -22,6 +22,12 @@ if [[ "$DEBUG" == "1" ]];then fi echo "TODO: REMOVE ME: CI/CD TESTING" +echo "DEBUG: prepare_ssh.sh" +echo "cat known hosts" +cat /etc/ssh/ssh_known_hosts + +echo "cat ssh_config" +cat /etc/ssh/ssh_config # argument mode if [[ $# -gt 0 ]]; then