Skip to content

Commit

Permalink
Pulsar Adapters: add download section (only source tarball) (#11247)
Browse files Browse the repository at this point in the history
Co-authored-by: Enrico Olivelli <[email protected]>
  • Loading branch information
eolivelli and eolivelli authored Jul 7, 2021
1 parent 887d74f commit 7a0a680
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
39 changes: 39 additions & 0 deletions site2/website/pages/en/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const translate = require('../../server/translate.js').translate;
const siteConfig = require(`${CWD}/siteConfig.js`);
const releases = require(`${CWD}/releases.json`);
const pulsarManagerReleases = require(`${CWD}/pulsar-manager-release.json`)
const pulsarAdaptersReleases = require(`${CWD}/pulsar-adapters-release.json`)
const connectors = require(`${CWD}/data/connectors.js`);

function getLatestArchiveMirrorUrl(version, type) {
Expand All @@ -22,6 +23,10 @@ function getLatestOffloadersMirrorUrl(version) {
return `https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=pulsar/pulsar-${version}/apache-pulsar-offloaders-${version}-bin.tar.gz`
}

function getLatestAdaptersMirrorUrl(version) {
return `https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=pulsar/pulsar-adapters-${version}/apache-pulsar-adapters-${version}-src.tar.gz`
}

function distUrl(version, type) {
return `https://www.apache.org/dist/pulsar/pulsar-${version}/apache-pulsar-${version}-${type}.tar.gz`
}
Expand All @@ -30,6 +35,10 @@ function distOffloadersUrl(version) {
return `https://www.apache.org/dist/pulsar/pulsar-${version}/apache-pulsar-offloaders-${version}-bin.tar.gz`
}

function distAdaptersUrl(version) {
return `https://downloads.apache.org/pulsar/pulsar-adapters-${version}/apache-pulsar-adapters-${version}-src.tar.gz`
}

function archiveUrl(version, type) {
if (version.includes('incubating')) {
return `https://archive.apache.org/dist/incubator/pulsar/pulsar-${version}/apache-pulsar-${version}-${type}.tar.gz`
Expand Down Expand Up @@ -62,6 +71,7 @@ class Download extends React.Component {
render() {
const latestVersion = releases[0];
const latestPulsarManagerVersion = pulsarManagerReleases[0];
const latestPulsarAdaptersVersion = pulsarAdaptersReleases[0];
const latestArchiveMirrorUrl = getLatestArchiveMirrorUrl(latestVersion, 'bin');
const latestSrcArchiveMirrorUrl = getLatestArchiveMirrorUrl(latestVersion, 'src');
const latestPulsarManagerArchiveMirrorUrl = getLatestPulsarManagerArchiveMirrorUrl(latestPulsarManagerVersion, 'bin');
Expand Down Expand Up @@ -283,6 +293,35 @@ class Download extends React.Component {
)}
</tbody>
</table>

<header className="postHeader">
<h1><translate>Pulsar Adapters</translate></h1>
<hr />
</header>
<h2 id="latest"><translate>Current version (Stable)</translate> {latestPulsarAdaptersVersion}</h2>
<table className="versions" style={{width:'100%'}}>
<thead>
<tr>
<th><translate>Release</translate></th>
<th><translate>Link</translate></th>
<th><translate>Crypto files</translate></th>
</tr>
</thead>
<tbody>
<tr>
<th><translate>Source</translate></th>
<td>
<a href={getLatestAdaptersMirrorUrl(latestPulsarAdaptersVersion)}>apache-pulsar-adapters-{latestPulsarAdaptersVersion}-src.tar.gz</a>
</td>
<td>
<a href={`${distAdaptersUrl(latestPulsarAdaptersVersion)}.asc`}>asc</a>,&nbsp;
<a href={`${distAdaptersUrl(latestPulsarAdaptersVersion)}.sha512`}>sha512</a>
</td>
</tr>
</tbody>
</table>
<translate>Pulsar Adapters are available on Maven Central, there is no binary package.</translate>

<header className="postHeader">
<h1><translate>Apache Pulsar Manager downloads</translate></h1>
<hr />
Expand Down
3 changes: 3 additions & 0 deletions site2/website/pulsar-adapters-release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"2.8.0"
]

0 comments on commit 7a0a680

Please sign in to comment.