mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-09-04 22:22:21 +02:00
review: adapt installation page text and dev-snapshot section to the docs version
Signed-off-by: danishedb <danish.khan@enterprisedb.com>
This commit is contained in:
parent
8a9aae168a
commit
2246df7602
@ -54,10 +54,9 @@ Both checks are required before proceeding with the installation.
|
||||
|
||||
## Installing the Barman Cloud Plugin
|
||||
|
||||
import { InstallationSnippet } from '@site/src/components/Installation';
|
||||
import { InstallationSnippet, ManifestVersion } from '@site/src/components/Installation';
|
||||
|
||||
Install the plugin using `kubectl` by applying the manifest for the latest
|
||||
release:
|
||||
Install the plugin using `kubectl` by applying the manifest for <ManifestVersion />:
|
||||
|
||||
<InstallationSnippet />
|
||||
|
||||
@ -98,12 +97,6 @@ deployment "barman-cloud" successfully rolled out
|
||||
|
||||
This confirms that the plugin is deployed and ready to use.
|
||||
|
||||
## Testing the latest development snapshot
|
||||
import { DevSnapshotSection } from '@site/src/components/Installation';
|
||||
|
||||
You can also test the latest development snapshot of the plugin with the
|
||||
following command:
|
||||
|
||||
```sh
|
||||
kubectl apply -f \
|
||||
https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml
|
||||
```
|
||||
<DevSnapshotSection />
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import {ReactElement} from 'react';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import {useActiveVersion} from '@docusaurus/plugin-content-docs/client';
|
||||
import Heading from '@theme/Heading';
|
||||
|
||||
// InstallationSnippet is the kubectl incantation to install the Barman
|
||||
// Cloud Plugin: the manifest matching the doc version being viewed, or
|
||||
@ -17,3 +18,32 @@ export function InstallationSnippet(): ReactElement<null> {
|
||||
</CodeBlock>
|
||||
);
|
||||
}
|
||||
|
||||
// ManifestVersion names the manifest the snippet below installs: the
|
||||
// release tag for a versioned docs page, or the main branch on Dev docs.
|
||||
export function ManifestVersion(): ReactElement<null> {
|
||||
const activeVersion = useActiveVersion('default');
|
||||
return activeVersion && activeVersion.name !== 'current'
|
||||
? <>version <code>v{activeVersion.name}</code></>
|
||||
: <>the latest development snapshot from the <code>main</code> branch</>;
|
||||
}
|
||||
|
||||
|
||||
// DevSnapshotSection offers the main-branch manifest as an alternative;
|
||||
// on the Dev docs the main install already is that manifest, so hide it.
|
||||
export function DevSnapshotSection(): ReactElement<null> | null {
|
||||
const activeVersion = useActiveVersion('default');
|
||||
const url = 'https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml';
|
||||
if (!activeVersion || activeVersion.name === 'current') return null;
|
||||
return (
|
||||
<>
|
||||
<Heading as="h2" id="testing-the-latest-development-snapshot">
|
||||
Testing the latest development snapshot
|
||||
</Heading>
|
||||
<CodeBlock language="sh">
|
||||
{`kubectl apply -f \\
|
||||
${url}`}
|
||||
</CodeBlock>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@ -54,10 +54,9 @@ Both checks are required before proceeding with the installation.
|
||||
|
||||
## Installing the Barman Cloud Plugin
|
||||
|
||||
import { InstallationSnippet } from '@site/src/components/Installation';
|
||||
import { InstallationSnippet, ManifestVersion } from '@site/src/components/Installation';
|
||||
|
||||
Install the plugin using `kubectl` by applying the manifest for the latest
|
||||
release:
|
||||
Install the plugin using `kubectl` by applying the manifest for <ManifestVersion />:
|
||||
|
||||
<InstallationSnippet />
|
||||
|
||||
@ -98,12 +97,6 @@ deployment "barman-cloud" successfully rolled out
|
||||
|
||||
This confirms that the plugin is deployed and ready to use.
|
||||
|
||||
## Testing the latest development snapshot
|
||||
import { DevSnapshotSection } from '@site/src/components/Installation';
|
||||
|
||||
You can also test the latest development snapshot of the plugin with the
|
||||
following command:
|
||||
|
||||
```sh
|
||||
kubectl apply -f \
|
||||
https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml
|
||||
```
|
||||
<DevSnapshotSection />
|
||||
|
||||
@ -54,10 +54,9 @@ Both checks are required before proceeding with the installation.
|
||||
|
||||
## Installing the Barman Cloud Plugin
|
||||
|
||||
import { InstallationSnippet } from '@site/src/components/Installation';
|
||||
import { InstallationSnippet, ManifestVersion } from '@site/src/components/Installation';
|
||||
|
||||
Install the plugin using `kubectl` by applying the manifest for the latest
|
||||
release:
|
||||
Install the plugin using `kubectl` by applying the manifest for <ManifestVersion />:
|
||||
|
||||
<InstallationSnippet />
|
||||
|
||||
@ -98,12 +97,6 @@ deployment "barman-cloud" successfully rolled out
|
||||
|
||||
This confirms that the plugin is deployed and ready to use.
|
||||
|
||||
## Testing the latest development snapshot
|
||||
import { DevSnapshotSection } from '@site/src/components/Installation';
|
||||
|
||||
You can also test the latest development snapshot of the plugin with the
|
||||
following command:
|
||||
|
||||
```sh
|
||||
kubectl apply -f \
|
||||
https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml
|
||||
```
|
||||
<DevSnapshotSection />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user