Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,7 @@ functions:
export NODE_JS_VERSION=${node_js_version}
source .evergreen/setup-env.sh
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
echo "registry=https://registry.npmjs.org/" > .npmrc
echo "//registry.npmjs.org/:_authToken=${devtoolsbot_npm_token}" >> .npmrc
echo "//registry.npmjs.org/:_authToken=${devtoolsbot_npm_token}" > .npmrc
npm --unsafe-perm=true run bootstrap-ci -- --ignore-prepublish
npm run evergreen-release publish
}
Expand Down Expand Up @@ -981,6 +980,20 @@ tasks:
node_js_version: "14.17.1"
distribution_build_variant: suse-x64
executable_os_id: linux-x64
- name: package_and_upload_artifact_amzn1_x64
depends_on:
- name: compile_artifact
variant: linux_x64_build
commands:
- func: checkout
- func: install
vars:
node_js_version: "14.17.1"
- func: package_and_upload_artifact
vars:
node_js_version: "14.17.1"
distribution_build_variant: amzn1-x64
executable_os_id: linux-x64
- name: package_and_upload_artifact_linux_arm64
depends_on:
- name: compile_artifact
Expand Down Expand Up @@ -1275,6 +1288,20 @@ tasks:
- func: test_artifact_docker
vars:
dockerfile: suse15-rpm
- name: pkg_test_docker_amazonlinux1_rpm
tags: ["smoke-test"]
depends_on:
- name: package_and_upload_artifact_amzn1_x64
variant: linux
commands:
- func: checkout
- func: get_artifact_url
vars:
source_distribution_build_variant: amzn1-x64
- func: write_preload_script
- func: test_artifact_docker
vars:
dockerfile: amazonlinux1-rpm
- name: pkg_test_debextract_debian_arm64
tags: ["smoke-test"]
depends_on:
Expand Down Expand Up @@ -1491,6 +1518,7 @@ buildvariants:
- name: package_and_upload_artifact_debian_x64
- name: package_and_upload_artifact_rhel_x64
- name: package_and_upload_artifact_suse_x64
- name: package_and_upload_artifact_amzn1_x64
- name: package_and_upload_artifact_linux_s390x
- name: package_and_upload_artifact_rhel_s390x
- name: package_and_upload_artifact_linux_arm64
Expand Down Expand Up @@ -1563,6 +1591,11 @@ buildvariants:
run_on: debian10-small
tasks:
- name: e2e_tests_linux_x64
- name: e2e_amazon1_x64
display_name: "Amazon Linux 1 x64 (E2E Tests)"
run_on: amazon1-2018-small
tasks:
- name: e2e_tests_linux_x64
- name: e2e_amazon2_x64
display_name: "Amazon Linux 2 x64 (E2E Tests)"
run_on: amazon2-small
Expand Down Expand Up @@ -1660,6 +1693,7 @@ buildvariants:
- name: pkg_test_docker_centos8_rpm
- name: pkg_test_docker_suse12_rpm
- name: pkg_test_docker_suse15_rpm
- name: pkg_test_docker_amazonlinux1_rpm
- name: pkg_test_docker_amazonlinux2_rpm
- name: pkg_test_docker_debian9_deb
- name: pkg_test_docker_debian10_deb
Expand Down
10 changes: 9 additions & 1 deletion .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const EXECUTABLE_PKG_INFO = [
{ name: 'linux-x64', packageOn: 'linux', smokeTestKind: 'none' },
{ name: 'debian-x64', packageOn: 'linux', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu18.04-deb', 'ubuntu20.04-deb', 'debian9-deb', 'debian10-deb'] },
{ name: 'rhel-x64', packageOn: 'linux', smokeTestKind: 'docker', smokeTestDockerfiles: ['centos7-rpm', 'centos8-rpm', 'amazonlinux2-rpm'] },
{ name: 'suse-x64', packageOn: 'linux', smokeTestKind: 'docker', smokeTestDockerfiles: ['suse12-rpm', 'suse15-rpm'] }
{ name: 'suse-x64', packageOn: 'linux', smokeTestKind: 'docker', smokeTestDockerfiles: ['suse12-rpm', 'suse15-rpm'] },
{ name: 'amzn1-x64', packageOn: 'linux', smokeTestKind: 'docker', smokeTestDockerfiles: ['amazonlinux1-rpm'] }
]
},
{
Expand Down Expand Up @@ -799,6 +800,7 @@ buildvariants:
- name: package_and_upload_artifact_debian_x64
- name: package_and_upload_artifact_rhel_x64
- name: package_and_upload_artifact_suse_x64
- name: package_and_upload_artifact_amzn1_x64
- name: package_and_upload_artifact_linux_s390x
- name: package_and_upload_artifact_rhel_s390x
- name: package_and_upload_artifact_linux_arm64
Expand Down Expand Up @@ -871,6 +873,11 @@ buildvariants:
run_on: debian10-small
tasks:
- name: e2e_tests_linux_x64
- name: e2e_amazon1_x64
display_name: "Amazon Linux 1 x64 (E2E Tests)"
run_on: amazon1-2018-small
tasks:
- name: e2e_tests_linux_x64
- name: e2e_amazon2_x64
display_name: "Amazon Linux 2 x64 (E2E Tests)"
run_on: amazon2-small
Expand Down Expand Up @@ -953,6 +960,7 @@ buildvariants:
- name: pkg_test_docker_centos8_rpm
- name: pkg_test_docker_suse12_rpm
- name: pkg_test_docker_suse15_rpm
- name: pkg_test_docker_amazonlinux1_rpm
- name: pkg_test_docker_amazonlinux2_rpm
- name: pkg_test_docker_debian9_deb
- name: pkg_test_docker_debian10_deb
Expand Down
18 changes: 18 additions & 0 deletions config/repo-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ repos:
repos:
- zypper/suse/15/mongodb-org

- name: amazon1
type: rpm
edition: org
bucket: repo.mongodb.org
architectures:
- x86_64
repos:
- yum/amazon/2013.03/mongodb-org

- name: amazon2
type: rpm
edition: org
Expand Down Expand Up @@ -240,6 +249,15 @@ repos:
repos:
- zypper/suse/15/mongodb-enterprise

- name: amazon1
type: rpm
edition: enterprise
bucket: repo.mongodb.com
architectures:
- x86_64
repos:
- yum/amazon/2013.03/mongodb-enterprise

- name: amazon2
type: rpm
edition: enterprise
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"lerna": "^4.0.0",
"mocha": "^7.1.2",
"mongodb": "addaleax/node-mongodb-native#71d4c39e5c858f49d10e840df626eca4da653e28",
"mongodb-download-url": "^1.0.1",
"mongodb-download-url": "^1.0.3",
"mongodb-js-precommit": "^2.0.0",
"nock": "^13.0.11",
"node-codesign": "^0.3.2",
Expand Down
8 changes: 7 additions & 1 deletion packages/build/src/barque.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tmp.setGracefulCleanup();
*/
type PPARepository =
'ubuntu1804' | 'ubuntu2004' | 'debian92' | 'debian10' |
'rhel70' | 'rhel80' | 'amazon2' | 'suse12' | 'suse15';
'rhel70' | 'rhel80' | 'amazon1' | 'amazon2' | 'suse12' | 'suse15';

/**
* Return the full list of [distro, arch] combinations that we upload for
Expand All @@ -32,6 +32,7 @@ type PPARepository =
*
* /config/repo-config.yml needs to be kept in sync with this.
*/
// eslint-disable-next-line complexity
export function getReposAndArch(buildVariant: BuildVariant): { ppas: PPARepository[], arch: string } {
switch (getDistro(buildVariant)) {
case 'win32':
Expand Down Expand Up @@ -62,6 +63,11 @@ export function getReposAndArch(buildVariant: BuildVariant): { ppas: PPAReposito
ppas: ['suse12', 'suse15'],
arch: getRPMArchName(getArch(buildVariant))
};
case 'amzn1':
return {
ppas: ['amazon1'],
arch: getRPMArchName(getArch(buildVariant))
};
case 'amzn2':
return {
ppas: ['amazon2'],
Expand Down
3 changes: 2 additions & 1 deletion packages/build/src/config/build-variant.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { ALL_BUILD_VARIANTS } from './build-variant';
describe('BuildVariant', () => {
describe('all build variants', () => {
it('has all of them', () => {
expect(ALL_BUILD_VARIANTS).to.have.length(16); // 4 × 3 linux + 4 others
expect(ALL_BUILD_VARIANTS).to.have.length(17); // 4 × 2 generic linux + 9 others
expect(ALL_BUILD_VARIANTS).to.contain('win32-x64');
expect(ALL_BUILD_VARIANTS).to.contain('win32msi-x64');
expect(ALL_BUILD_VARIANTS).to.contain('darwin-x64');
expect(ALL_BUILD_VARIANTS).to.contain('debian-x64');
expect(ALL_BUILD_VARIANTS).to.contain('suse-x64');
expect(ALL_BUILD_VARIANTS).to.contain('amzn1-x64');
expect(ALL_BUILD_VARIANTS).to.contain('amzn2-arm64');
for (const arch of ['x64', 'arm64', 's390x', 'ppc64le']) {
expect(ALL_BUILD_VARIANTS).to.contain(`linux-${arch}`);
Expand Down
4 changes: 3 additions & 1 deletion packages/build/src/config/build-variant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Different from 'platform': platform is extracted from os.platform() and
* build variant defines the desired distribution type to build for.
*/
export type Distro = 'win32' | 'win32msi' | 'darwin' | 'linux' | 'debian' | 'rhel' | 'suse' | 'amzn2';
export type Distro = 'win32' | 'win32msi' | 'darwin' | 'linux' | 'debian' | 'rhel' | 'suse' | 'amzn1' | 'amzn2';
export type Arch = 'x64' | 's390x' | 'arm64' | 'ppc64le';
export type BuildVariant = `${Distro}-${Arch}`;

Expand All @@ -15,6 +15,7 @@ export const ALL_BUILD_VARIANTS: readonly BuildVariant[] = Object.freeze([
'debian-x64', 'debian-arm64',
'rhel-x64', 'rhel-s390x', 'rhel-arm64', 'rhel-ppc64le',
'suse-x64',
'amzn1-x64',
'amzn2-arm64'
] as const);

Expand Down Expand Up @@ -72,6 +73,7 @@ export function getDownloadCenterDistroDescription(variant: BuildVariant): strin
case 'rhel-ppc64le': return 'Redhat / Centos ppc64le';
case 'rhel-arm64': return 'Redhat / Centos arm64';
case 'suse-x64': return 'SUSE Linux 64-bit';
case 'amzn1-x64': return 'Amazon Linux 1 64-bit';
case 'amzn2-arm64': return 'Amazon Linux 2 arm64';
default: throw new Error(`${variant} is not a valid build variant`);
}
Expand Down
2 changes: 2 additions & 0 deletions packages/build/src/packaging/download-mongocryptd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ function lookupReleaseDistro(variant: BuildVariant): string {
return 'debian92';
case 'suse':
return 'suse12';
case 'amzn1':
return 'amazon';
case 'amzn2':
return 'amazon2';
case 'rhel':
Expand Down
1 change: 1 addition & 0 deletions packages/build/src/packaging/package/create-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export async function createPackage(
break;
case 'rhel':
case 'suse':
case 'amzn1':
case 'amzn2':
await createRedhatPackage(packageInformation, packageInformation.rpmTemplateDir, getArch(buildVariant), fullTarballFilePath);
break;
Expand Down
5 changes: 5 additions & 0 deletions packages/build/src/packaging/package/get-package-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export function getPackageFile(buildVariant: BuildVariant, packageInformation: P
path: `${rpmName}-${version}.suse12.${getRPMArchName(getArch(buildVariant))}.rpm`,
contentType: 'application/x-rpm'
};
case 'amzn1':
return {
path: `${rpmName}-${version}.amzn1.${getRPMArchName(getArch(buildVariant))}.rpm`,
contentType: 'application/x-rpm'
};
case 'amzn2':
return {
path: `${rpmName}-${version}.amzn2.${getRPMArchName(getArch(buildVariant))}.rpm`,
Expand Down
6 changes: 5 additions & 1 deletion packages/build/src/run-publish.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('publish', () => {
shouldDoPublicRelease
);

expect(barque.releaseToBarque).to.have.been.callCount(16);
expect(barque.releaseToBarque).to.have.been.callCount(17);
expect(barque.releaseToBarque).to.have.been.calledWith(
'rhel-x64',
'https://s3.amazonaws.com/mciuploads/project/v0.7.0-draft.42/mongodb-mongosh-0.7.0.el7.x86_64.rpm'
Expand All @@ -162,6 +162,10 @@ describe('publish', () => {
'amzn2-arm64',
'https://s3.amazonaws.com/mciuploads/project/v0.7.0-draft.42/mongodb-mongosh-0.7.0.amzn2.aarch64.rpm'
);
expect(barque.releaseToBarque).to.have.been.calledWith(
'amzn1-x64',
'https://s3.amazonaws.com/mciuploads/project/v0.7.0-draft.42/mongodb-mongosh-0.7.0.amzn1.x86_64.rpm'
);
expect(barque.waitUntilPackagesAreAvailable).to.have.been.called;
});

Expand Down
7 changes: 7 additions & 0 deletions scripts/docker/amazonlinux1-rpm.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM amazonlinux:1

ARG artifact_url=""
ADD ${artifact_url} /tmp
RUN yum repolist
RUN yum install -y /tmp/*mongosh-*.x86_64.rpm
ENTRYPOINT [ "mongosh" ]
1 change: 1 addition & 0 deletions scripts/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if [ x"$ARTIFACT_URL" = x"" ]; then
case "$1" in
*deb) FILENAME="mongodb-mongosh_${VERSION}_amd64.deb";;
suse*) FILENAME="mongodb-mongosh-${VERSION}.suse12.x86_64.rpm";;
amazon1*) FILENAME="mongodb-mongosh-${VERSION}.amzn1.x86_64.rpm";;
*) FILENAME="mongodb-mongosh-${VERSION}.el7.x86_64.rpm";; # amzn2, centos
esac
ARTIFACT_URL="https://s3.amazonaws.com/mciuploads/mongosh/${SHA}/${FILENAME}"
Expand Down