Merge pull request #279 from ryanjbaxter/publish-antora-docs

Fixing host key
This commit is contained in:
Ryan Baxter
2024-05-21 15:52:54 -04:00
committed by GitHub

View File

@@ -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";
}