From 0e3a5af0d2f61c5a3f677c90d97ae53652ea9308 Mon Sep 17 00:00:00 2001 From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> Date: Tue, 21 May 2024 15:52:36 -0400 Subject: [PATCH] Fixing host key --- .../releaser/internal/project/ProjectCommandExecutor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java index ad95710a..fa2522ab 100644 --- a/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java +++ b/releaser-core/src/main/java/releaser/internal/project/ProjectCommandExecutor.java @@ -189,6 +189,11 @@ public class ProjectCommandExecutor { commands[i] = commands[i].replace("{{cat-key}}", "\"$(cat $DOCS_SERVER_SSH_KEY)\""); } } + for (int i = 0; i < commands.length; i++) { + if (commands[i].contains("{{host-key}}")) { + commands[i] = commands[i].replace("{{host-key}}", properties.getAntora().getSpringDocsSshHostKey()); + } + } runCommand(properties, antoraDocsProject.getAbsolutePath() + "/rsync-antora-reference/src", commands); } @@ -343,7 +348,7 @@ class CommandPicker { String repo = properties.getGit().getOrgName() + "/" + version.projectName; // TODO this needs to be a property return "./jenkins.sh --docs-username " + properties.getAntora().getSpringDocsSshUsername() + " --docs-ssh-key-path " + properties.getAntora().getSpringDocsSshKeyPath() - + " --docs-host docs-ip.spring.io --docs-ssh-host-key " + properties.getAntora().getSpringDocsSshHostKey() + " --site-path " + + " --docs-host docs-ip.spring.io --docs-ssh-host-key {{host-key}} --site-path " + project.getAbsolutePath() + "/target/antora/site --github-repository " + repo + " --dry-run"; }