Compare commits

..

1 Commits

Author SHA1 Message Date
Danish
e9e7cc3edc
Merge 2246df7602 into 8a9aae168a 2026-08-26 13:05:14 +00:00
4 changed files with 11 additions and 23 deletions

View File

@ -97,8 +97,6 @@ deployment "barman-cloud" successfully rolled out
This confirms that the plugin is deployed and ready to use. This confirms that the plugin is deployed and ready to use.
## Testing the latest development snapshot
import { DevSnapshotSection } from '@site/src/components/Installation'; import { DevSnapshotSection } from '@site/src/components/Installation';
<DevSnapshotSection /> <DevSnapshotSection />

View File

@ -1,10 +1,7 @@
import {ReactElement} from 'react'; import {ReactElement} from 'react';
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import {useActiveVersion} from '@docusaurus/plugin-content-docs/client'; import {useActiveVersion} from '@docusaurus/plugin-content-docs/client';
import Heading from '@theme/Heading';
// DEV_MANIFEST_URL is the URL of the manifest.yaml on the main branch of the plugin repo.
const DEV_MANIFEST_URL =
'https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml';
// InstallationSnippet is the kubectl incantation to install the Barman // InstallationSnippet is the kubectl incantation to install the Barman
// Cloud Plugin: the manifest matching the doc version being viewed, or // Cloud Plugin: the manifest matching the doc version being viewed, or
@ -13,7 +10,7 @@ export function InstallationSnippet(): ReactElement<null> {
const activeVersion = useActiveVersion('default'); const activeVersion = useActiveVersion('default');
const url = activeVersion && activeVersion.name !== 'current' const url = activeVersion && activeVersion.name !== 'current'
? `https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v${activeVersion.name}/manifest.yaml` ? `https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v${activeVersion.name}/manifest.yaml`
: DEV_MANIFEST_URL; : 'https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml';
return ( return (
<CodeBlock language="sh"> <CodeBlock language="sh">
{`kubectl apply -f \\ {`kubectl apply -f \\
@ -27,28 +24,25 @@ export function InstallationSnippet(): ReactElement<null> {
export function ManifestVersion(): ReactElement<null> { export function ManifestVersion(): ReactElement<null> {
const activeVersion = useActiveVersion('default'); const activeVersion = useActiveVersion('default');
return activeVersion && activeVersion.name !== 'current' return activeVersion && activeVersion.name !== 'current'
? <code>v{activeVersion.name}</code> ? <>version <code>v{activeVersion.name}</code></>
: <>the latest development snapshot from the <code>main</code> branch</>; : <>the latest development snapshot from the <code>main</code> branch</>;
} }
// DevSnapshotSection offers the main-branch manifest as an alternative; // DevSnapshotSection offers the main-branch manifest as an alternative;
// on the Dev docs the main install already is that manifest, so hide it. // on the Dev docs the main install already is that manifest, so hide it.
export function DevSnapshotSection(): ReactElement { export function DevSnapshotSection(): ReactElement<null> | null {
const activeVersion = useActiveVersion('default'); const activeVersion = useActiveVersion('default');
if (!activeVersion || activeVersion.name === 'current') { const url = 'https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml';
return ( if (!activeVersion || activeVersion.name === 'current') return null;
<p>The <a href="#installing-the-barman-cloud-plugin">install
command above</a> already applies the latest development
snapshot from the <code>main</code> branch.</p>
);
}
return ( return (
<> <>
<p>You can also test the latest development snapshot of the plugin <Heading as="h2" id="testing-the-latest-development-snapshot">
with the following command:</p> Testing the latest development snapshot
</Heading>
<CodeBlock language="sh"> <CodeBlock language="sh">
{`kubectl apply -f \\ {`kubectl apply -f \\
${DEV_MANIFEST_URL}`} ${url}`}
</CodeBlock> </CodeBlock>
</> </>
); );

View File

@ -97,8 +97,6 @@ deployment "barman-cloud" successfully rolled out
This confirms that the plugin is deployed and ready to use. This confirms that the plugin is deployed and ready to use.
## Testing the latest development snapshot
import { DevSnapshotSection } from '@site/src/components/Installation'; import { DevSnapshotSection } from '@site/src/components/Installation';
<DevSnapshotSection /> <DevSnapshotSection />

View File

@ -97,8 +97,6 @@ deployment "barman-cloud" successfully rolled out
This confirms that the plugin is deployed and ready to use. This confirms that the plugin is deployed and ready to use.
## Testing the latest development snapshot
import { DevSnapshotSection } from '@site/src/components/Installation'; import { DevSnapshotSection } from '@site/src/components/Installation';
<DevSnapshotSection /> <DevSnapshotSection />