Skip to content

Commit

Permalink
fix(ci): fix barque publishing (#2102)
Browse files Browse the repository at this point in the history
  • Loading branch information
mabaasit authored Jul 29, 2024
1 parent 235c047 commit 002ba4b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/build/src/barque.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ describe('Barque', function () {
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/6.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
'https://repo.mongodb.org/yum/redhat/8/mongodb-org/7.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/7.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
'https://repo.mongodb.org/yum/redhat/8/mongodb-org/8.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/8.0/s390x/RPMS/mongodb-mongosh-0.1.0.el7.s390x.rpm',
],
},
Expand All @@ -253,7 +252,6 @@ describe('Barque', function () {
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/6.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
'https://repo.mongodb.org/yum/redhat/8/mongodb-org/7.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/7.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
'https://repo.mongodb.org/yum/redhat/8/mongodb-org/8.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
'https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/8.0/ppc64le/RPMS/mongodb-mongosh-0.1.0.el7.ppc64le.rpm',
],
},
Expand Down
16 changes: 16 additions & 0 deletions packages/build/src/barque.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import tar from 'tar-fs';
import tmp from 'tmp-promise';
import util, { promisify } from 'util';
import type { PackageVariant, Config } from './config';
import semver from 'semver';
import {
getArch,
getDistro,
Expand Down Expand Up @@ -218,6 +219,21 @@ export class Barque {
for (const { repo: ppa, serverVersions } of ppasWithServerVersions) {
for (const version of serverVersions) {
for (const edition of this.mongodbEditions) {
// For ppc64le and s390x, we only publish enterprise edition only
// starting server version 6. But in order to keep the current publishing
// behaviour, we will only skip publishing for server version 8.0 community
// edition.
if (
edition === 'org' &&
['ppc64le', 's390x'].includes(architecture) &&
semver.gte(version, '8.0.0')
) {
console.info(
`Skipping publishing community v${version} for ${architecture}`
);
continue;
}

const args = [
'--level',
'debug',
Expand Down

0 comments on commit 002ba4b

Please sign in to comment.