Skip to content

Commit 002ba4b

Browse files
authored
fix(ci): fix barque publishing (#2102)
1 parent 235c047 commit 002ba4b

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

packages/build/src/barque.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ describe('Barque', function () {
229229
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/6.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
230230
'https://repo.mongodb.org/yum/redhat/8/mongodb-org/7.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
231231
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/7.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
232-
'https://repo.mongodb.org/yum/redhat/8/mongodb-org/8.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
233232
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/8.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
234233
],
235234
},
@@ -253,7 +252,6 @@ describe('Barque', function () {
253252
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/6.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
254253
'https://repo.mongodb.org/yum/redhat/8/mongodb-org/7.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
255254
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/7.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
256-
'https://repo.mongodb.org/yum/redhat/8/mongodb-org/8.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
257255
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/8.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
258256
],
259257
},

packages/build/src/barque.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import tar from 'tar-fs';
1010
import tmp from 'tmp-promise';
1111
import util, { promisify } from 'util';
1212
import type { PackageVariant, Config } from './config';
13+
import semver from 'semver';
1314
import {
1415
getArch,
1516
getDistro,
@@ -218,6 +219,21 @@ export class Barque {
218219
for (const { repo: ppa, serverVersions } of ppasWithServerVersions) {
219220
for (const version of serverVersions) {
220221
for (const edition of this.mongodbEditions) {
222+
// For ppc64le and s390x, we only publish enterprise edition only
223+
// starting server version 6. But in order to keep the current publishing
224+
// behaviour, we will only skip publishing for server version 8.0 community
225+
// edition.
226+
if (
227+
edition === 'org' &&
228+
['ppc64le', 's390x'].includes(architecture) &&
229+
semver.gte(version, '8.0.0')
230+
) {
231+
console.info(
232+
`Skipping publishing community v${version} for ${architecture}`
233+
);
234+
continue;
235+
}
236+
221237
const args = [
222238
'--level',
223239
'debug',

0 commit comments

Comments
 (0)